MASK in UI_​​PICT

This topic contains 10 replies, has 4 voices, and was last updated by  Nader Belal 4 months, 3 weeks ago.

  • Author
    Posts
  • #4434

    Vojtěch Janda
    Participant

    Hallo,

    Please, give me an advice.

    I have the picture in PNG format with an alpha channel.
    Why does the alpha channel appear as a black color? The image is saved as a gsm object. See attached picture.

    Attachments:
  • #4437

    Péter Baksa
    Participant

    Hi,

    try the picture2{2} command.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #4440

    Vojtěch Janda
    Participant

    Thank you.
    It works. But only with a jpg file. And how do I get the channel to show up in the user interface? With command UI_PICT?

    Thank you very much

    Attachments:
  • #4442

    Joachim Sühlo
    Participant

    Yes, UI_PICT with a 1 at the end instead of a 0.
    Mask Value = 1
    UI_PICT picture_reference, x, y [, width, height [, mask]]

    GDL Object Developer
    b-prisma
    MAC OSx 10.12

  • #4445

    Péter Baksa
    Participant

    Hi Vojtěch,

    I’ve tested it in AC22 and it works for me.

    Which AC version are you using?
    What do you mean by “The image is saved as a gsm object”?
    What is the code to show the images?
    Could you attach both the png and the jpg for testing?

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #4449

    Vojtěch Janda
    Participant

    Hi Péter.

    I attach png and pln file.

    – I tested it in AC18 (windows and mac) and AC22 (mac). It is the same.
    – I paste the image into ArchiCAD and save it as a library object. In this object, I write a 2D description and description of the user interface. (If the image is not part of the object but as the separate object, then everything is fine – See the fourth example)

    Thank you very much.

    Here is the pln file: http://leteckaposta.cz/419529947

  • #4452

    Vojtěch Janda
    Participant

    Here is GIF and JPG

    Attachments:
  • #4457

    Péter Baksa
    Participant

    Thanks, this looks like a bug, I will add it to the list.

    There are other ways that you can use an image, no need to save it as gsm:
    – add to the embedded library, it will be included in the pln/pla/teamwork file.
    – put it in a folder, and add it as a library. Many plan files can access the pictures this way, all users have to have access to the folder.
    – use the lp_xmlconverter tool to include an image in the libpart, just like saving as gsm. This works with transparent images (except jpg as ui_pict).

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #4458

    Vojtěch Janda
    Participant

    Thank you.

    I tried the LP_​XMLConverter, but this way was easier.
    So I will try the convertor again…

    Is there any video tutorial on LP_ XMLConverter?
    Except: https://www.youtube.com/watch?v=wbucx37Leas

    what is meaning the command: “pathOfLP_XMLConverterExecuteable”
    Path to the LP_XMLConverter?

    Thank you

  • #4459

    Péter Baksa
    Participant

    Yes, “pathOfLP_XMLConverterExecuteable” is path including the executable, eg. “C:\ArchiCAD 22\LP_XMLConverter.exe”.
    I don’t know about any training video on this.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #4487

    Nader Belal
    Participant

    @Vojtěch Janda

    when selecting the file path for conversion, and if you are in a Windows OS environment, just drag the file to the CMD window, it will write the full path and the file name in quotation marks (which is accepted by OS)

You must be logged in to reply to this topic.