Moving image contents
Both of the following fail for me: put img 1 into img 2 set the imagedata of img 2 to the imagedata of img 1 Can anyone else get these to work? I get either nothing in the first case, or visual garbage (and a likely eventual crash) in the second. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving image contents
Hi Jaqueline, Both of the following fail for me: put img 1 into img 2 works fine here OS X MC 2.5/RR 2.0.1. set the imagedata of img 2 to the imagedata of img 1 If i remember right, the trick is here to have 2 images with identical height/width to make it work. So you could try to set these props of img 2 BEFORE you set the imagedata... ... set the height of img 2 to the formattedheight of img 1 set the width of img 2 to the formattedwidth of img 1 set the imagedata of img 2 to the imagedata of img 1 ... Tested and works :-) Can anyone else get these to work? I get either nothing in the first case, or visual garbage (and a likely eventual crash) in the second. See above... Hope that helps... Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com Regards Klaus Major [EMAIL PROTECTED] www.major-k.de ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
RE: Moving image contents
Klaus is right about the identical height/width when you are using set the imageData (otherwise you'll get garbage), but you don't need it with put img 1 into img 2 - img 2 will automatically expand or contract to deal with displaying the image. What platform are you trying the put img 1 into img 2 on? Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Klaus Major Sent: Tuesday, July 08, 2003 1:36 PM To: [EMAIL PROTECTED] Subject: Re: Moving image contents Hi Jaqueline, Both of the following fail for me: put img 1 into img 2 works fine here OS X MC 2.5/RR 2.0.1. set the imagedata of img 2 to the imagedata of img 1 If i remember right, the trick is here to have 2 images with identical height/width to make it work. So you could try to set these props of img 2 BEFORE you set the imagedata... ... set the height of img 2 to the formattedheight of img 1 set the width of img 2 to the formattedwidth of img 1 set the imagedata of img 2 to the imagedata of img 1 ... Tested and works :-) Can anyone else get these to work? I get either nothing in the first case, or visual garbage (and a likely eventual crash) in the second. See above... Hope that helps... Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com Regards Klaus Major [EMAIL PROTECTED] www.major-k.de ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metac ard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving image contents
On 7/8/03 1:36 PM, Klaus Major wrote: Hi Jaqueline, Both of the following fail for me: put img 1 into img 2 works fine here OS X MC 2.5/RR 2.0.1. Thanks for testing, Klaus. set the imagedata of img 2 to the imagedata of img 1 If i remember right, the trick is here to have 2 images with identical height/width to make it work. So you could try to set these props of img 2 BEFORE you set the imagedata... Yes, I did that. I get garbage. I'm on OS X, but someone else is having the same problem on Windows, which is why I'm trying to track it down. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving image contents
At 11:08 AM -0700 7/8/03, J. Landman Gay wrote: Both of the following fail for me: put img 1 into img 2 set the imagedata of img 2 to the imagedata of img 1 Can anyone else get these to work? I get either nothing in the first case, or visual garbage (and a likely eventual crash) in the second. Silly question, but are you sure image 1 isn't a referenced image? (with its data in a file and filename property set) -- Jeanne A. E. DeVoto ~ [EMAIL PROTECTED] Runtime Revolution Limited - Software at the Speed of Thought http://www.runrev.com/ ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving image contents
On 7/8/03 2:36 PM, Ken Ray wrote: Klaus is right about the identical height/width when you are using set the imageData (otherwise you'll get garbage), but you don't need it with put img 1 into img 2 - img 2 will automatically expand or contract to deal with displaying the image. What platform are you trying the put img 1 into img 2 on? An update: I imported a different (jpg) image. This one works when I set the imagedata of a blank image to the imagedata of the imported image. Then I took a snapshot, and that also works when I move its contents using imagedata (both rects are the same.) However, neither image works when I use put img 1 into img 2. Image 2 remains empty with a data size of 0. My original test image does not work with either command, but it is from a very old stack and I don't remember what its original format was. Still testing on OS X (10.2.6). -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving image contents
On 7/8/03 3:28 PM, Jeanne A. E. DeVoto wrote: At 11:08 AM -0700 7/8/03, J. Landman Gay wrote: Both of the following fail for me: put img 1 into img 2 set the imagedata of img 2 to the imagedata of img 1 Can anyone else get these to work? I get either nothing in the first case, or visual garbage (and a likely eventual crash) in the second. Silly question, but are you sure image 1 isn't a referenced image? (with its data in a file and filename property set) Oh, I wouldn't put it past me. ;) But no, in this case, I've tried both an imported image and a newly-created snapshot, both of which are stored in the stack. I must not have had the second image size correct in my first test, since now that I'm specifically creating an identically-sized new image, the imagedata method does work. But put img 1 into img 2 still doesn't. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Moving image contents
I can confirm that "put image 1 into image 2" doesn't work here on OS X. I've tried JPEG and GIF images, nothing unusual about them (as far as I know). I just get an empty image. ImageData works well in my tests. -- Brian Yennie Chief Technology Officer QLD Learning, LLC www.QLDLearning.com PH: (904)-997-0212 EMAIL: [EMAIL PROTECTED] ---
Re: Moving image contents
On 7/8/03 4:01 PM, [EMAIL PROTECTED] wrote: I can confirm that put image 1 into image 2 doesn't work here on OS X. I've tried JPEG and GIF images, nothing unusual about them (as far as I know). I just get an empty image. ImageData works well in my tests. ImageData is working for me too now, I must have screwed up my intial tests. I think I've got the rest of it figured out too, after a clue from Scott Raney. It all depends on the paintCompression property, which is both a global property and an image property. The default is rle, which doesn't work with put img 1 into img 2. Putting an image's contents into another image only works with jpeg, gif, or png images (streaming image formats.) So, the following does NOT work: 1. Take a snapshot. -- this img is in rle format by default 2. Create an empty image 3. Issue: put img 1 into img 2 -- fails, because the paintcompression is rle However, for imported images, MC retains the native compression format. If I import a gif, the image's paintcompression remains gif even though the global property is still rle. If I set the global property to gif as well, a new, empty image will also be in gif format. This DOES work: 1. Use the import paint command to import a gif image -- or jpeg or png 2. Issue: set the paintcompression to gif -- sets the global storage format; this is the key 3. Create an empty image -- which now will also be in gif format 4. Issue: put img 1 into img 2 -- WORKS -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard