Work with object...

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
newuser
Posts: 4
Joined: 2019-05-31T21:50:47-07:00
Authentication code: 1152

Work with object...

Post 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!
Last edited by newuser on 2019-06-01T06:47:21-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Work with object...

Post 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.
newuser
Posts: 4
Joined: 2019-05-31T21:50:47-07:00
Authentication code: 1152

Re: Work with object...

Post by newuser »

Thanks for the answer. You understood correctly! Can this be done using the perl module?
newuser
Posts: 4
Joined: 2019-05-31T21:50:47-07:00
Authentication code: 1152

Re: Work with object...

Post by newuser »

fmw42 wrote: 2019-05-31T23:04:07-07:00 Thanks for the answer. You understood correctly!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Work with object...

Post by fmw42 »

Sorry, I do not know PerlMagick. Someone else will have to point you in the right direction.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Work with object...

Post 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.
newuser
Posts: 4
Joined: 2019-05-31T21:50:47-07:00
Authentication code: 1152

Re: Work with object...

Post 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
Post Reply