Page 1 of 1
export snapshot issue
Posted: Tue Nov 23, 2010 1:53 am
by shaosean
Am taking a snapshot of an image control (actually any control shows the issue) but the returned image data seems to be broken.. If I export to a file, the file has the correct data.. Am using Rev Enterprise 4.0 on Mac OS X 10.5.8 (PPC), I tried with Rev 2.8.1 and got the same issue..
- create a new stack
- import an image on the card
- place a button on the card
- edit the script of the button (use the code below)
- click button
Code: Select all
on mouseUp
constant kObj = "image 1"
local tSs
export snapshot from kObj to tSs
create image
set the width of it to (the width of kObj)
set the height of it to (the height of kObj)
set the imageData of it to tSs
end mouseUp
Re: export snapshot issue
Posted: Tue Nov 23, 2010 2:00 am
by shaosean
Apparently one does not simply set the imageData of an image, but the text..
works
Re: export snapshot issue
Posted: Tue Nov 23, 2010 1:39 pm
by Klaus
Hi Sean,
yep, that's right.
Although setting the text of an image is everything but intuitive and mentally highly challenging
Best
Klaus
Re: export snapshot issue
Posted: Tue Nov 23, 2010 2:15 pm
by shaosean
No wonder I stay away from doing GUI related features

Re: export snapshot issue
Posted: Wed Nov 24, 2010 9:40 pm
by jmburnod
Hi All
Why not
Code: Select all
export snapshot from kObj to file MyFilePath
set the filename of last img to MyFilePath
Best
Jean-Marc
Re: export snapshot issue
Posted: Wed Nov 24, 2010 10:42 pm
by shaosean
Thanks for the tip, but trying to figure out where to store temporary files on someone else's machine is not always a nice thing to do so I was looking to do it all in memory
Re: export snapshot issue
Posted: Wed Nov 24, 2010 11:15 pm
by paul_gr
Klaus wrote:setting the text of an image is everything but intuitive and mentally highly challenging.
You got that right...
Paul
Re: export snapshot issue
Posted: Thu Nov 25, 2010 12:29 am
by Klaus
shaosean wrote:Thanks for the tip, but trying to figure out where to store temporary files on someone else's machine is not always a nice thing to do so I was looking to do it all in memory
Hm, isn't the TEMP folder(specialfolderpath("temporary")) meant for these kind of actions?
I always used this in the past and never got sued!

Re: export snapshot issue
Posted: Thu Nov 25, 2010 1:11 am
by shaosean
But there is no point to writing out a file when it can all be done in memory.. That makes the code quicker and also causes less wear on the drive

Re: export snapshot issue
Posted: Thu Nov 25, 2010 1:09 pm
by Klaus
shaosean wrote:But there is no point to writing out a file when it can all be done in memory.. That makes the code quicker and also causes less wear on the drive

OK, OK, lets agree that this might be a case of personal taste
