conversion progress?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
ebgb
Posts: 11
Joined: 2010-03-24T15:04:01-07:00
Authentication code: 8675308

conversion progress?

Post by ebgb »

new here, finally joined! usually everything I've ever needed to know has already been answered! respect!!

anyhoo...

can't find anything to help with my current conundrum, and it might not even be possible anyway...

using php, to convert a pdf to a png and then create a thumbnail

no problem there, all works tickety boo. The pdf's are all single page docs, but are big. lots of vector stuff going on as well as embedded raster images in each file. some may be 30meg or so in size

can sometimes take 4 or 5 minutes for the the magick to happen, so was wondering if there is any mechanism to provide some kind of feed back - a progress bar if you will to display tot he user browser side>>

something a bit ajax'y perhaps??

or am I just wishing for the moon again!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: conversion progress?

Post by fmw42 »

IM is a command line system basically. So the only thing I know that is built into IM is the IM function -monitor

see http://www.imagemagick.org/script/comma ... hp#monitor and http://www.imagemagick.org/Usage/basics/#controls

it display progress per command to the terminal in a continuous numerical fashion as it processes line-by-line.
ebgb
Posts: 11
Joined: 2010-03-24T15:04:01-07:00
Authentication code: 8675308

Re: conversion progress?

Post by ebgb »

I should have made it a bit clearer, my bit of magick is happening thorugh a web page via php

was hoping for something I can feed back to php or javascript even to show some sort of progress to the end user
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: conversion progress?

Post by fmw42 »

I understood that. But that was all I could off. With static return to terminal, you can get that info from the exec command into an array. I would not know how to take the dynamic return and export that via exec. Perhaps one of the PHP experts can come up with something.

I don't know if this is relevant or not, but if you search Google for "PHP progress bar", you get a lot of returns.
goldskif
Posts: 22
Joined: 2012-02-19T03:51:30-07:00
Authentication code: 8675308

Re: conversion progress?

Post by goldskif »

Is it possible to use the PV of the Debian ?????
% sudo aptitude install pv

USAGE
%tar -cf - . | pv -cN tar -s $(du -sb | grep -o '[0-9]*') | gzip | pv -cN gzip > out.tgz
tar: 97.1MB 0:00:08 [12.3MB/s] [>......................] 0% ETA 1:50:26
gzip: 13.1MB 0:00:08 [1.6MB/s] [....<=>................]
Post Reply