View Full Version : Device Manager and PNG Files
harleydude
February 14th, 2008, 07:00 AM
I think this problem is related to G5, but not sure. I have a image that is stored with a device in the Device Manager. The image is being sent to NR, however it does not appear that the transparency and blending information is being sent with the image. See the images below. The first one is being sent via the Device Manager, the second is sent using NetRemote.SetImage. These images are taken from the NR cache folder.
Any ideas?
Rob H
February 15th, 2008, 01:16 AM
How is the image being loaded into the DM control?
harleydude
February 15th, 2008, 05:56 AM
png = { MimeType = "image/png",
Command = function (self,filename)
local image = gd.createFromPng (filename)
if not image then
self:Log (4,'Failed to load image '.. filename)
return '',0,0
end
local imagestring = image:pngStr ()
assert (imagestring)
return imagestring,image:sizeX (),image:sizeY()
end },
Rob H
February 15th, 2008, 10:11 AM
Before you call image:pngStr() can you try image:saveAlpha(true) - this defaults to off and may well be responsible for the problem you're seeing.
harleydude
February 15th, 2008, 10:40 AM
Rob,
That looks like what it needed.
Thanks
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.