GetPicture/Trim
Chuck Neal
chuck at mediamacros.com
Tue Jul 27 14:42:12 CDT 2004
Still hoping there is a better answer, but if anyone is interested this
seems to do the trick. Do this to the image before storing...
--vimage is the cast member to save
--we have to actually use pixel #2 from the left as Valentina has a habit
--of taking row 1 (0 for getPixel/setPixel) and storing it on the right
--top corner, if its white make it slightly "off white"
c = vImage.image.getPixel(1,0)
if c = rgb(255,255,255) then
vImage.image.setPixel(1,0, rgb(1,1,1))
end if
--bottom corner, if its white, make it slightly "off white"
c = vImage.image.getPixel(vImage.width - 1, vImage.height - 1)
if c = rgb(255,255,255) then
vImage.image.setPixel(vImage.width-1, vImage.height - 1, rgb(1,1,1))
end if
Seems to do the job here at least. :)
-Chuck
--------------------------
Chuck Neal
CEO, MediaMacros, Inc.
chuck at mediamacros.com
http://www.mediamacros.com
-----Original Message-----
From: valentina-bounces at lists.macserve.net
[mailto:valentina-bounces at lists.macserve.net] On Behalf Of Chuck Neal
Sent: Tuesday, July 27, 2004 2:26 PM
To: valentina at lists.macserve.net
Subject: GetPicture/Trim
Has there been any solution to the problem of setPicture/getPicture trimming
the white space off of an image? I ran a test. I created a 400X400 jpeg with
a white background and a small 100X100 image in the middle. I imported into
Director and in the code it shows the correct member size of 400X400 before
using setPicture.
When I use getPicture to immediately retrieve the image, it only brings out
the 100X100 image. Its as if it is running or using trimWhiteSpace() on
either the saving or loading of the data. Blobs are a bit out of the
question as this project has some very large images and the file size is
extremely important. Has anyone found any kind of work around for this?
Thanks.
-Chuck
--------------------------
Chuck Neal
CEO, MediaMacros, Inc.
chuck at mediamacros.com
http://www.mediamacros.com
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list