DefineVirtualFile and transparent PNG

Report any Hollywood bugs here
Post Reply
Paolo Canonici
Posts: 3
Joined: Tue Feb 16, 2010 7:11 pm
Location: Rome
Contact:

DefineVirtualFile and transparent PNG

Post by Paolo Canonici » Thu Feb 18, 2010 4:41 pm

Hello all,
I've implemented a resource file builder that takes a set of user's specified files and creates an unique huge file containing all the data. It works fine since I've tested the inverse action by extracting randomly a file and verifying that this exactly corresponds to the original one. All has gone well but I'm unable to correctly load PNGs with trasparency. Thus the following code raises an error:

Code: Select all

local vf$ = MCRFDefineVirtualFile("stuff2/fonts/comic16_00.png")
local brushid = LoadBrush(nil, vf$, {LoadAlpha = true})
DisplayBrush(brushid, 0, 0)
The error says: Image "comic16_00.png" does not have an alpha channel!

Note that MCRFDefineVirtualFile is a function wich translates the fully qualified file path into the correct virtual file by inspecting an index table (stored in the resource file too) and it's fully functional, infact the code above works on PNGs without transparency and other file types.

I'm using Hollywood 4.0 under WinUAE wich is emulating an A4000. Might it be an Hollywood bug or am I missing something?

Thanks all,
Paolo.

User avatar
airsoftsoftwair
Posts: 3355
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DefineVirtualFile and transparent PNG

Post by airsoftsoftwair » Fri Feb 19, 2010 11:59 am

Yes, that's a bug in 4.0 that occurred only under OS3 but it is fixed in 4.5. From the Hollywood history:
- Fix [OS3]: Embedded alpha channel images did not work in compiled applets/executables

Post Reply