Mark,

Thanks for the idea...but it still doesn't work.  I'm thinking maybe I'm 
approaching this from the wrong direction somehow.


On Feb 24, 2011, at 3:48 PM, Mark Schonewille wrote:

> Hi,
> 
> You can't set the imagedata to jpeg data. You can set imagedata only to 
> imagedata. You want to set the text instead, something like
> 
> Set the text of img x to myJpegData
> 
> --
> Kind regards,
> 
> Mark Schonewille
> Economy-x-Talk
> Http://economy-x-talk.com
> 
> Share the clipboard of your computer over a local network with Clipboard Link 
> http://clipboardlink.economy-x-talk.com
> 
> 
> Op 24 feb. 2011 om 21:14 heeft Tim Ponn <alpt...@orwell.net> het volgende 
> geschreven:
> 
>> Thanks, but it still doesn't work.
>> 
>> I think I failed to describe exactly what it is that I've got here.
>> 
>> I have a stack with a single empty image object, we'll call it "Test1"... 
>> and 20 fields.  Further, I have a file that contains both binary jpeg image 
>> data and readable text.  Each "record" within the file (about 19,000 
>> records) consists of first the jpeg data and then the readable text.  On 
>> startup, I load the entire file into a global.  I click a button, respond to 
>> an ask dialog and it locates the record within the global.  The script then 
>> extracts the chunks of readable data and fills in the 20 fields 
>> appropriately.  Lastly, I am left with the jpeg data which I would like to 
>> display in the empty image object, :Test1".
>> 
>> I think I have multiple problems...
>> 
>> 1...I must set the rect of the empty image to whatever image I'm trying to 
>> put there.  Jacque, you've confirmed this...now I have to find where the 
>> image size lurks in the binary data and apply it.
>> 2...I load that file into the global using the "URL" method.  Maybe it's no 
>> longer binary and therefore not the correct data type for the image?
>> 
>> If there's an easier way, I could use some help there.  Has anyone got some 
>> code bits to share here?
>> 
>> Thanks!
>> 
>> 
>> 
>> On Feb 24, 2011, at 2:26 PM, J. Landman Gay wrote:
>> 
>>> 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         |     jac...@hyperactivesw.com
>>> HyperActive Software           |     http://www.hyperactivesw.com
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> 
>> Best Regards,
>> 
>> Timothy R. Ponn
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




Best Regards,

Timothy R. Ponn





_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to