Image – Invalid Resource when export

Home Forums General Panels, Components, Macros Image – Invalid Resource when export

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #118327
    lecletolecleto
    Participant
    • Topics: 6
    • Replies: 25
    • Total: 31

    Hello Ctrlrs!!

    I have a logo in my panel.

    I load this logo image resource at Tab-Resources. I can see the .png image on right place but when I export to .exe file the image disapear and I can see on exported file the message “Invalid Resource” in red.

    I also tried export a bpanelz and genterate a .exe from this but I have the same problem.

    How I can solve this? What can be wrong? I´m on version Ctrlr 5.3.201.

    Many thanks!!

    • This topic was modified 2 weeks, 4 days ago by lecletolecleto.
    #118330
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 319
    • Total: 322
    • ★★

    Hi Lecleto,

    You probably have a messed up image cache folder for your panel. If your panel name is lecletospanel, then delete the folder in AppData\Roaming and try again.

    I have a batch file deletestandalone.bat on my desktop which I run when testing containing something like the following code:

    
    @RD /S /Q "C:\Users\%USERNAME%\AppData\Roaming\lecletospanel"
    
    #118331
    lecletolecleto
    Participant
    • Topics: 6
    • Replies: 25
    • Total: 31

    Hello Dnaldoog!

    Always you with your genorosity!
    Yeah! More than one day trying do this and now my panel finaly with a logo!!
    As I said I lost all my Lua Codes but the panel now are working. As you described in other post I´m now saving a bpanelz before any more hard action. I also copy all scripts on notepad. This helped me today!! I lost the panel one more time trying to put this image but now you solved my problem!
    Sometimes I feel Ctrlr as labyrint!!
    I´m glad that we have people as you in this forum!

    Thank you one more time!!!

    #118332
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 319
    • Total: 322
    • ★★

    Truest thing ever said – a labyrinth!

    #118335
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 319
    • Total: 322
    • ★★

    Also Lecleto – when you export as bpanelz or standalone or VST, you must add 24 pixels to the height of the panel first, otherwise you will notice the panel gets truncated 24px at the bottom.

    So if your panel dimensions were 1280 x 1024 you would enter in 0 0 1280 1048 uiPanelCanvasRectangle

    #118345
    lecletolecleto
    Participant
    • Topics: 6
    • Replies: 25
    • Total: 31

    Yeah Dnaldog!
    I perceived this problem in my first exports. Tricks and tricks! We are heros making this panels!!
    I have more questions…
    Is necessary always clean this cache folder and files or just when we have a resource problem?
    What is the real diference between .panel and .bpanelz
    Thank you in advance!

    #118350
    dnaldoogdnaldoog
    Participant
    • Topics: 3
    • Replies: 319
    • Total: 322
    • ★★

    Hi Lecleto,

    The image cache thing is fine I think with .panel files or .bpanelz – that is to say if you change an image the .panel you are working on will show the changes, but if you reexport as standalone a second + time as a developer, the standalone will use the old images from before; that is why you need to delete that old directory. Whenever I test a standalone I always delete that directory using a batch file script.

    Actually the user would have to too, so if you re-release a new version of a panel publicly with new images, the end user might have the same problem.

    You can get around this by
    File -> Export -> Re-generate UID to create a new directory of images the panel refers to. The end user would still have the old image directory left on their computer though.

    I mention image directory problem on the JD-990 panel page. ctrlr.org/roland-jd990-super-editor/

    • MacOS ※ If images are not visible/loading — delete folder Library/Preferences/JD-990 Super Editor/ and restart program.
    • WINDOWS ※ If old images are loading, but not new: — delete folder C:\Users\%USERNAME%\AppData\Roaming\JD-990 Super Editor and restart program

    A .bpanel file is just an XML text file. You can export it to a Compressed binary which will have the suffix .bpanelz, but to bundle all resources (images mostly), export it to a Compressed binary + Resources also called .bpanelz. You will notice there is a huge file size difference when compressing a .panel with a lot of lua code in it.

    Regards,

    • This reply was modified 2 weeks, 2 days ago by dnaldoogdnaldoog.
    #118349
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 490
    • Total: 531
    • ★★★

    Only needed to clean the cache when there is a resource issue.

    .panel is a xml file yo can open in an editor as Notepad++
    .bpanelz is a binary (b) compressed (z) file of a panel including the resources. Use that for sharing your panel otherwise people will mis the images.

    Here is a summary I made in my Step by step guide (maybe it is only in my draft 2.x version):

    Ctrlr standalone reads and can export its data in different formats:
    ─ XML: creates a .panel file (XML file that is thus readable/editable in Notepad or any text editor).
    ─ Compressed XML: creates a compressed file with extension .panelz
    ─ Binary: creates a binary file with extension .bpanel
    ─ Compressed binary: creates a compressed binary file with extension .bpanelz
    ─ Compressed binary + resources: creates a file containing the panel, images and fonts used as resources with extension .bpanelz (the best way to share on the net, smallest and loads quick)
    ─ Instance: creates an .exe file that contains the panel, its resources but also the complete Ctrlr program. It can be used to distribute your panel without having people downloading something. Everything is editable, people can switch mode…
    ─ Restricted instance: same as Instance (an .exe file is also created) but not editable
    Use Compressed binary + resources when you want to share your panel with other people by providing them access to all images, the Lua code… so they can modify the panel or look how you built it.
    Use Restricted instance when you want to distribute the panel in such a way that people cannot modify the panel or look at the Lua code. In a restricted instance the Panel menu is removed and the File menu contains only Quit.

    #118401
    lecletolecleto
    Participant
    • Topics: 6
    • Replies: 25
    • Total: 31

    Hello Dnaldoog and GoodWeather, many thanks for explanation.

    I´m in the end of my second panel but this basic questions are still fragile in my mind. No more after this rich explanations. Goodweather I downloaded your 4 versions of Ctrlr tutorial that I saw in other post but I still have to read with carefuly. Excelent action for begin in Ctrlr world!

    Thank you guys!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 23 guests online
No users are currently active
Forum Statistics
Threads: 2,366, Posts: 16,546, Members: 57,609
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!