Doubt Related to Architecture of ImageMagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
ArunKumar
Posts: 59
Joined: 2020-03-05T00:12:15-07:00
Authentication code: 1152

Doubt Related to Architecture of ImageMagick

Post by ArunKumar »

What is Pixel Cache ?
I read the Pixel cache in Architecture Overview https://imagemagick.org/script/architecture.php#cache But I was unable to understand it clearly what it say.
Can anyone explain in simple terms about their usage and purpose

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Doubt Related to Architecture of ImageMagick

Post by snibgo »

When IM reads an image, it decompresses the data and writes the pixels into a memory structure called the pixel cache. For example, this may take 2 or 4 bytes per pixel per channel. If you don't have enough free memory, the pixel cache is stored on disk.

Image operations either directly change data in the cache (eg "-auto-level"), or create a new cache and copy data from the old cache to the new one (eg "-blur").

Does that answer the question?
snibgo's IM pages: im.snibgo.com

ArunKumar
Posts: 59
Joined: 2020-03-05T00:12:15-07:00
Authentication code: 1152

Re: Doubt Related to Architecture of ImageMagick

Post by ArunKumar »

What is user-time & elapsed time in an image .Can anyone explain it ?
I found User-time & Elapsed time term when I used identify image1.jpg command to get the properties of an image

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Doubt Related to Architecture of ImageMagick

Post by snibgo »

Those are times taken to execute the command. Not wall time, but cpu time and process time, or something.
snibgo's IM pages: im.snibgo.com

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: Doubt Related to Architecture of ImageMagick

Post by magick »

There is a timer attached when an image is instantiated. The timer tracks how much time has elapsed since its creation as well as how much CPU has been consumed. Its generally useful for debugging performance.

ArunKumar
Posts: 59
Joined: 2020-03-05T00:12:15-07:00
Authentication code: 1152

Re: Doubt Related to Architecture of ImageMagick

Post by ArunKumar »

magick wrote:
2020-03-30T08:01:39-07:00
There is a timer attached when an image is instantiated. The timer tracks how much time has elapsed since its creation as well as how much CPU has been consumed. Its generally useful for debugging performance.
Hence Elapsed Time is total Time Since its Creation & User Time is cpu time
Is it correct ?

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: Doubt Related to Architecture of ImageMagick

Post by magick »

Yes. Elapsed time is time since the inception of a particular image, whereas, CPU is the CPU time of ImageMagick and is not directly tied to a particular image unless that is the only image instantiated.

ArunKumar
Posts: 59
Joined: 2020-03-05T00:12:15-07:00
Authentication code: 1152

Re: Doubt Related to Architecture of ImageMagick

Post by ArunKumar »

https://drive.google.com/open?id=1MGJP2 ... pXDH8ogGa7

This file have a properties of the 250 image .The properties of these image is obtained using "identify" command
These 250 images are resized image using
convert image.jpg -resize 1000x1000! image.jpg
command.

My Doubt is Why the Elapsed Time & User Time is zero for all the image.
Last edited by ArunKumar on 2020-04-02T05:43:07-07:00, edited 1 time in total.

ArunKumar
Posts: 59
Joined: 2020-03-05T00:12:15-07:00
Authentication code: 1152

Re: Doubt Related to Architecture of ImageMagick

Post by ArunKumar »

Why the Elapsed Time & User Time is zero for all the image ?

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Doubt Related to Architecture of ImageMagick

Post by snibgo »

Your question is vague. Please show a sample command and the output.

Times are given to a precision of 0.001 seconds, so very fast operations will show zero.
snibgo's IM pages: im.snibgo.com

ArunKumar
Posts: 59
Joined: 2020-03-05T00:12:15-07:00
Authentication code: 1152

Re: Doubt Related to Architecture of ImageMagick

Post by ArunKumar »

snibgo wrote:
2020-04-02T06:02:59-07:00
Your question is vague. Please show a sample command and the output.

Times are given to a precision of 0.001 seconds, so very fast operations will show zero.
I used this command
convert image.jpg -resize 1000x1000! image.jpg
to resize the image.jpg

commad
identify image.jpg
gives the properties of an image:

image1.jpg JPG 1000x1000 1000x1000+0+0 8-bit sRGB 392037B 0.000u 0:00.000

User-time : 0.000u
Elapsed-time: 0:00.000

Why User-time & Elapsed-time is Zero?

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Doubt Related to Architecture of ImageMagick

Post by snibgo »

That is the time taken for the "identify" command.
snibgo's IM pages: im.snibgo.com

Locked