Chipp,
Thanks for the tip.
For those interested, I've found a (slightly) different
but (slightly) faster way to do this :
on mouseUp
put the screenrect into tRect
export snapshot from rect tRect to var as JPEG
create img
put var into img 1
end mouseUp
the difference is probably
Hi JB,
Why did you originally want to create two images? I had the
impression that your goal was to have two image objects. Also, why do
you use JPEG instead of PNG?
Best,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Salery
Mark,
My original goal was to get the imagedata of a snapshot as fast
as possible.
I first tried with import snapshot but realized that it didn't
produce any valid imageData.
Then I thought that may be creating a 2nd image and putting
the image content of the snapshot into the 2nd image would
Hi Chipp,
I already tried that but it doesn't work : when import snapshot
is executed, a new image object is created with an imagedata of
right length, but its content doesn't match the image content of
the snapshot; instead it's filled with zeros (the default imagedata
for a newly created
jbv,
I tried this and it works just fine:
on mouseUp
put the screenRect into tRect
import snapshot from rect tRect
create img
put img 1 into img 2
end mouseUp
The trick is to create the var tRect first before using the import
snapshot command.
best,
Chipp
Could decoding the RGB of one of the last 10 pixels help? This assumes that
Rev processes from first to last of the image length.
Jim Ault
Las Vegas
yep... this also assumes that you never have 10 black pixels at
the bottom right of your screen...
JB
Why not just do this?
on mouseUp
import snapshot from rect (the screenRect)
put length(the imagedata of img 1)
create img
put img 1 into img 2
end mouseUp
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to
Hi list,
when using
import snapshot from rect (the screenrect)
as well as
export snapshot from rect (the screenrect) to myVar as JPEG
put var into img 1
it seems that the imageData of the image object is blank...
I tried with Rev 2,5 and MC 2.4.1
Am I missing something, or is there
The following scripts work fine in Rev 2.7.1.
on mouseUp
import snapshot from rect (the screenRect)
end mouseUp
on mouseUp
export snapshot from rect 100,100,200,200 to myVar as PNG
set the rect of img 1 to 110,110,210,210
put myVar into img 1
end mouseUp
Best,
Mark
--
Economy-x-Talk
Mark,
yes, it works fine for me too, but as I said before, the imageData
of the imported image seems to blank...
and as the Rev doc says, the image content and the imageData prop.
are in different forms... so it seems that the image content displays,
but the imageData isn't created...
Am I
Hi JB...
Why do you think that the imagedata of the imported image are
blank...? What should I do to see what you see...? Here, the
imagedata of the image are not blank... (do you mean empty...?)...
where do the docs say that the imagedata and image content are
different...? Try the
Mark,
yes, you're right; but try this :
on mouseUp
import snapshot from rect (the screenRect)
put length(the imagedata of img 1)
create img
set rect of img 2 to rect of img 1
set imageData of img 2 to imageData of img 1
end mouseUp
the 2nd image is just a black rect;
On May 31, 2006, at 8:48 AM, jbv wrote:
the 2nd image is just a black rect; although the imagedata
contains more than 5 Mb of binary, it seems that they're
all zeros...
It might be that Rev is gagging on the large JPEG. Perhaps, this
works better with PNG.
Dar
JB,
Your script works fine here. I don't know why it wouldn't work for
you. Did you restart Revolution and try this script again in an
otherwise empty stack? Maybe, you machine is too slow, you don't have
enough memory available, or maybe you have an empty image on your
card which you
yes, there seems to be a speed problem...
in the following example :
on mouseUp
import snapshot from rect (the screenRect)
create img
set rect of img 2 to rect of img 1
set imageData of img 2 to imageData of img 1
end mouseUp
it looks like lines 2 to 4 are executed before the
Hi from Paris,
I agree about Rev gagging on large JPEG files, and
coming up with a black rect.
On May 31, 2006, at 8:48 AM, jbv wrote:
the 2nd image is just a black rect; although the imagedata
contains more than 5 Mb of binary, it seems that they're
all zeros...
It might be that Rev is
On May 31, 2006, at 12:45 PM, jbv wrote:
I wonder if there's a way to know when the import snapshot
is completed to start further processing of the imageData...
Candidates might be...
unlock screen
wait
Dar Scott
___
use-revolution
Could decoding the RGB of one of the last 10 pixels help? This assumes that
Rev processes from first to last of the image length.
Jim Ault
Las Vegas
On 5/31/06 12:57 PM, Dar Scott [EMAIL PROTECTED] wrote:
On May 31, 2006, at 12:45 PM, jbv wrote:
I wonder if there's a way to know when the
18 matches
Mail list logo