Page 1 of 1

Work with object...

Posted: 2019-05-31T22:03:32-07:00
by newuser
Hello! Help. There is an object. I need to resize the image and get the pixels. I need information about the changed pixels. Is it possible without intermediate(TEMP) files? I do not know much English. That's what I want.

read image - IM
resize - IM
getpixels - IM
Not TempFile!

Re: Work with object...

Posted: 2019-05-31T23:04:07-07:00
by fmw42
What do you mean "changed pixels" all pixels will be changes when you resize due to interpolation. Please always provide your IM version and platform when asking questions. Please explain in further detail you question. To get pixel values after you resize, just use the command line:

Code: Select all

convert image -resize WxH txt:
See https://imagemagick.org/Usage/files/#txt

Sorry, I do not know PerlMagick, only the command line.

Re: Work with object...

Posted: 2019-06-01T06:16:36-07:00
by newuser
Thanks for the answer. You understood correctly! Can this be done using the perl module?

Re: Work with object...

Posted: 2019-06-01T06:21:26-07:00
by newuser
fmw42 wrote: 2019-05-31T23:04:07-07:00 Thanks for the answer. You understood correctly!

Re: Work with object...

Posted: 2019-06-01T10:27:30-07:00
by fmw42
Sorry, I do not know PerlMagick. Someone else will have to point you in the right direction.

Re: Work with object...

Posted: 2019-06-01T10:57:35-07:00
by magick
With PerlMagick you can read an image, resize it, and get the pixels all in memory. See https://imagemagick.org/script/perl-magick.php for example PerlMagick scripts.

Re: Work with object...

Posted: 2019-06-01T12:20:57-07:00
by newuser
magick wrote: 2019-06-01T10:57:35-07:00 Method Clone. Or is there something else? Thanks for the kick ass. It made me think :D