Displaying Images in Rev

J. Landman Gay jacque at hyperactivesw.com
Thu Feb 24 13:26:39 CST 2011


On 2/24/11 12:58 PM, Tim Ponn wrote:
> Hello all!
>
> I've got a file that has many jpg images embedded in it (something
> like 19,000 or so).  There's other data in there too.  I can isolate
> a particular record.  I can see the binary jpeg data.  I can copy
> that data, create a new jpg file...then open that file with a jpeg
> viewer and all is well.  Now comes rev...once again, I can isolate
> the image binary data...but when I set the image data to that data,
> the image is mostly black with a narrow sliver at the left edge
> that's shades of colors.  Is this a  problem because I don't have the
> rect set correctly for my blank image?

Yes, that's exactly it. The size of the containing image has to match 
the source image to the pixel, or the data will become corrupted.

You can get around that by putting the source into the container without 
using the imagedata at all:

   put img "source image.png" into img "destination.jpg"

The receiving image will resize to fit automatically if you have its 
lockLocation set to false.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list