Speed up “movie barcode” generation w/ IM

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?".
killmoms
Posts: 29
Joined: 2014-07-07T07:41:47-07:00
Authentication code: 6789

Re: Speed up “movie barcode” generation w/ IM

Post by killmoms »

fmw42 wrote:Was it faster than starting with PPM or PNG or whatever your original format was for the same code? It should be. That was the point of MPC.
No, because it required reading more data from disk. Maybe my installation of ImageMagick is busted, or maybe OS X's I/O code doesn't allow whatever IM needs for MPC to be fast off the disk, or maybe "convert -crop" is the wrong tool to use because it requires paging the entire file from disk to memory, but reading 16.6MB takes longer than reading 6.2MB (takes longer than reading 1MB). The limitation for this process right now is file I/O, because no matter what I do it seems I have to read entire image files off the disk just to pull a single row of pixels. So anytime the files get bigger, things take longer.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Speed up “movie barcode” generation w/ IM

Post by fmw42 »

No, because it required reading more data from disk
Sorry, are you saying that MPC was not faster or that you did not test against other formats?
killmoms
Posts: 29
Joined: 2014-07-07T07:41:47-07:00
Authentication code: 6789

Re: Speed up “movie barcode” generation w/ IM

Post by killmoms »

I'm saying that "16.6MB MPC source images cropped with convert -crop" was slower than "6.2MB PPM source images cropped with stream -extract".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Speed up “movie barcode” generation w/ IM

Post by fmw42 »

OK. So you did not do a one-to-one comparison. No problem. I was just curious about whether it was faster than non-stream PPM.

Perhaps Magick can give you more help on your post to the Developers forum. I do not know what more to try.
killmoms
Posts: 29
Joined: 2014-07-07T07:41:47-07:00
Authentication code: 6789

Re: Speed up “movie barcode” generation w/ IM

Post by killmoms »

That's okay, I know this is pretty deep in the weeds in terms of a very specialized (and unfriendly to more common approaches) task. Thanks for helping!
Post Reply