librelist archives

« back to archive

trying to move some command-line ImageMagick code to Python

trying to move some command-line ImageMagick code to Python

From:
David La Puma
Date:
2013-03-27 @ 15:32
Hey All-

So excited to see Wand in action and really want to get my code
consolidated into a single environment. Right now I'm running ImageMagick
command-line code from a shell script:

Here's the command line code, which uses CONVERT and OPTIMIZE.

convert -delay $theDelay /path/to/images/$theDateStamp*.png -layers
optimize -write
/path/to/animationFolder/NewAnimatedGIFfile-$theDateStamp.gif -delete 1--1
-resize 200x200
/path/to/animationFolder/NewStaticGIFthumb-$theDateStamp-t.gif

basically, the script goes to a folder where I have downloaded time-stamped
images and creates an animated GIF with only those images that meet the
timestamp requirement; saves it to the animation folder; then it creates a
thumbnail of that animated gif by deleting the frames, resizing, and saving
the single gif image to the same folder, with a "-t" addition to the name.
I'd like to run this in a loop within Python, but can't figure out how to
translate this into something that Wand can handle.

Any help would is greatly appreciated.


Thanks

David
________________________

David A. La Puma
Postdoctoral Research Associate
SILVIS Lab (http://silvis.forest.wisc.edu/)
University of Wisconsin, Madison

Re: [wand] trying to move some command-line ImageMagick code to Python

From:
Hong Minhee
Date:
2013-03-28 @ 04:00
Hi David,

Creating animated GIF requires sequences feature I am working on.  It will
be included by 0.3.0 version, and I am going to release 0.3.0 at late of 
this month (probably 31st March).

You can find the roadmap of 0.3.0 in the following url:

  http://docs.wand-py.org/en/latest/roadmap.html#version-0-3


Thanks,
Hong Minhee

On Mar 28, 2013, at 12:32 AM, David La Puma <woodcreeper@gmail.com> wrote:

> Hey All-
> 
> So excited to see Wand in action and really want to get my code 
consolidated into a single environment. Right now I'm running ImageMagick 
command-line code from a shell script:
> 
> Here's the command line code, which uses CONVERT and OPTIMIZE.
> 
> convert -delay $theDelay /path/to/images/$theDateStamp*.png -layers 
optimize -write 
/path/to/animationFolder/NewAnimatedGIFfile-$theDateStamp.gif -delete 1--1
-resize 200x200 
/path/to/animationFolder/NewStaticGIFthumb-$theDateStamp-t.gif 
> 
> basically, the script goes to a folder where I have downloaded 
time-stamped images and creates an animated GIF with only those images 
that meet the timestamp requirement; saves it to the animation folder; 
then it creates a thumbnail of that animated gif by deleting the frames, 
resizing, and saving the single gif image to the same folder, with a "-t" 
addition to the name. I'd like to run this in a loop within Python, but 
can't figure out how to translate this into something that Wand can 
handle.
> 
> Any help would is greatly appreciated.
> 
> 
> Thanks
> 
> David
> ________________________
> 
> David A. La Puma
> Postdoctoral Research Associate
> SILVIS Lab (http://silvis.forest.wisc.edu/)
> University of Wisconsin, Madison
> 

Re: [wand] trying to move some command-line ImageMagick code to Python

From:
David La Puma
Date:
2013-03-28 @ 15:49
Hong,

Thanks for the reply. I look forward to that functionality- but at least
now I can stop obsessing about it knowing it's not currently possible ;)

cheers

David
________________________

David A. La Puma
Postdoctoral Research Associate
SILVIS Lab (http://silvis.forest.wisc.edu/)
University of Wisconsin, Madison

Teaching/Research Profile:
http://www.woodcreeper.com/teaching

Websites:
http://www.woodcreeper.com
http://badbirdz2.wordpress.com





On Wed, Mar 27, 2013 at 11:00 PM, Hong Minhee <minhee@dahlia.kr> wrote:

> Hi David,
>
> Creating animated GIF requires sequences feature I am working on.  It will
> be included by 0.3.0 version, and I am going to release 0.3.0 at late of
> this month (probably 31st March).
>
> You can find the roadmap of 0.3.0 in the following url:
>
>   http://docs.wand-py.org/en/latest/roadmap.html#version-0-3
>
>
> Thanks,
> Hong Minhee
>
> On Mar 28, 2013, at 12:32 AM, David La Puma <woodcreeper@gmail.com> wrote:
>
> > Hey All-
> >
> > So excited to see Wand in action and really want to get my code
> consolidated into a single environment. Right now I'm running ImageMagick
> command-line code from a shell script:
> >
> > Here's the command line code, which uses CONVERT and OPTIMIZE.
> >
> > convert -delay $theDelay /path/to/images/$theDateStamp*.png -layers
> optimize -write
> /path/to/animationFolder/NewAnimatedGIFfile-$theDateStamp.gif -delete 1--1
> -resize 200x200
> /path/to/animationFolder/NewStaticGIFthumb-$theDateStamp-t.gif
> >
> > basically, the script goes to a folder where I have downloaded
> time-stamped images and creates an animated GIF with only those images that
> meet the timestamp requirement; saves it to the animation folder; then it
> creates a thumbnail of that animated gif by deleting the frames, resizing,
> and saving the single gif image to the same folder, with a "-t" addition to
> the name. I'd like to run this in a loop within Python, but can't figure
> out how to translate this into something that Wand can handle.
> >
> > Any help would is greatly appreciated.
> >
> >
> > Thanks
> >
> > David
> > ________________________
> >
> > David A. La Puma
> > Postdoctoral Research Associate
> > SILVIS Lab (http://silvis.forest.wisc.edu/)
> > University of Wisconsin, Madison
> >
>
>

Re: [wand] trying to move some command-line ImageMagick code to Python

From:
David La Puma
Date:
2013-03-28 @ 18:15
Hong

I just read the Roadmap document. It says "animations" are slated for "very
future versions"... so that means I won't be able to use Wand to translate
the code in question until then, right?

Super bummed!!!

David
________________________

David A. La Puma
Postdoctoral Research Associate
SILVIS Lab (http://silvis.forest.wisc.edu/)
University of Wisconsin, Madison

Teaching/Research Profile:
http://www.woodcreeper.com/teaching

Websites:
http://www.woodcreeper.com
http://badbirdz2.wordpress.com





On Thu, Mar 28, 2013 at 10:49 AM, David La Puma <woodcreeper@gmail.com>wrote:

> Hong,
>
> Thanks for the reply. I look forward to that functionality- but at least
> now I can stop obsessing about it knowing it's not currently possible ;)
>
> cheers
>
> David
> ________________________
>
> David A. La Puma
> Postdoctoral Research Associate
> SILVIS Lab (http://silvis.forest.wisc.edu/)
> University of Wisconsin, Madison
>
> Teaching/Research Profile:
> http://www.woodcreeper.com/teaching
>
> Websites:
> http://www.woodcreeper.com
> http://badbirdz2.wordpress.com
>
>
>
>
>
> On Wed, Mar 27, 2013 at 11:00 PM, Hong Minhee <minhee@dahlia.kr> wrote:
>
>> Hi David,
>>
>> Creating animated GIF requires sequences feature I am working on.  It
>> will be included by 0.3.0 version, and I am going to release 0.3.0 at late
>> of this month (probably 31st March).
>>
>> You can find the roadmap of 0.3.0 in the following url:
>>
>>   http://docs.wand-py.org/en/latest/roadmap.html#version-0-3
>>
>>
>> Thanks,
>> Hong Minhee
>>
>> On Mar 28, 2013, at 12:32 AM, David La Puma <woodcreeper@gmail.com>
>> wrote:
>>
>> > Hey All-
>> >
>> > So excited to see Wand in action and really want to get my code
>> consolidated into a single environment. Right now I'm running ImageMagick
>> command-line code from a shell script:
>> >
>> > Here's the command line code, which uses CONVERT and OPTIMIZE.
>> >
>> > convert -delay $theDelay /path/to/images/$theDateStamp*.png -layers
>> optimize -write
>> /path/to/animationFolder/NewAnimatedGIFfile-$theDateStamp.gif -delete 1--1
>> -resize 200x200
>> /path/to/animationFolder/NewStaticGIFthumb-$theDateStamp-t.gif
>> >
>> > basically, the script goes to a folder where I have downloaded
>> time-stamped images and creates an animated GIF with only those images that
>> meet the timestamp requirement; saves it to the animation folder; then it
>> creates a thumbnail of that animated gif by deleting the frames, resizing,
>> and saving the single gif image to the same folder, with a "-t" addition to
>> the name. I'd like to run this in a loop within Python, but can't figure
>> out how to translate this into something that Wand can handle.
>> >
>> > Any help would is greatly appreciated.
>> >
>> >
>> > Thanks
>> >
>> > David
>> > ________________________
>> >
>> > David A. La Puma
>> > Postdoctoral Research Associate
>> > SILVIS Lab (http://silvis.forest.wisc.edu/)
>> > University of Wisconsin, Madison
>> >
>>
>>
>

Re: [wand] trying to move some command-line ImageMagick code to Python

From:
Hong Minhee
Date:
2013-03-29 @ 08:44
Indeed, I missed that.  However, basically animations feature heavily 
depends on sequences feature.  I think it would be able to deal with most 
of animation-related functions.

On Mar 29, 2013, at 3:15 AM, David La Puma <woodcreeper@gmail.com> wrote:

> Hong
> 
> I just read the Roadmap document. It says "animations" are slated for 
"very future versions"... so that means I won't be able to use Wand to 
translate the code in question until then, right? 
> 
> Super bummed!!!
> 
> David
> ________________________
> 
> David A. La Puma
> Postdoctoral Research Associate
> SILVIS Lab (http://silvis.forest.wisc.edu/)
> University of Wisconsin, Madison
> 
> Teaching/Research Profile:
> http://www.woodcreeper.com/teaching
> 
> Websites:
> http://www.woodcreeper.com
> http://badbirdz2.wordpress.com
> 
> 
> 
> 
> 
> On Thu, Mar 28, 2013 at 10:49 AM, David La Puma <woodcreeper@gmail.com> wrote:
> Hong, 
> 
> Thanks for the reply. I look forward to that functionality- but at least
now I can stop obsessing about it knowing it's not currently possible ;)
> 
> cheers
> 
> David
> ________________________
> 
> David A. La Puma
> Postdoctoral Research Associate
> SILVIS Lab (http://silvis.forest.wisc.edu/)
> University of Wisconsin, Madison
> 
> Teaching/Research Profile:
> http://www.woodcreeper.com/teaching
> 
> Websites:
> http://www.woodcreeper.com
> http://badbirdz2.wordpress.com
> 
> 
> 
> 
> 
> On Wed, Mar 27, 2013 at 11:00 PM, Hong Minhee <minhee@dahlia.kr> wrote:
> Hi David,
> 
> Creating animated GIF requires sequences feature I am working on.  It 
will be included by 0.3.0 version, and I am going to release 0.3.0 at late
of this month (probably 31st March).
> 
> You can find the roadmap of 0.3.0 in the following url:
> 
>   http://docs.wand-py.org/en/latest/roadmap.html#version-0-3
> 
> 
> Thanks,
> Hong Minhee
> 
> On Mar 28, 2013, at 12:32 AM, David La Puma <woodcreeper@gmail.com> wrote:
> 
> > Hey All-
> >
> > So excited to see Wand in action and really want to get my code 
consolidated into a single environment. Right now I'm running ImageMagick 
command-line code from a shell script:
> >
> > Here's the command line code, which uses CONVERT and OPTIMIZE.
> >
> > convert -delay $theDelay /path/to/images/$theDateStamp*.png -layers 
optimize -write 
/path/to/animationFolder/NewAnimatedGIFfile-$theDateStamp.gif -delete 1--1
-resize 200x200 
/path/to/animationFolder/NewStaticGIFthumb-$theDateStamp-t.gif
> >
> > basically, the script goes to a folder where I have downloaded 
time-stamped images and creates an animated GIF with only those images 
that meet the timestamp requirement; saves it to the animation folder; 
then it creates a thumbnail of that animated gif by deleting the frames, 
resizing, and saving the single gif image to the same folder, with a "-t" 
addition to the name. I'd like to run this in a loop within Python, but 
can't figure out how to translate this into something that Wand can 
handle.
> >
> > Any help would is greatly appreciated.
> >
> >
> > Thanks
> >
> > David
> > ________________________
> >
> > David A. La Puma
> > Postdoctoral Research Associate
> > SILVIS Lab (http://silvis.forest.wisc.edu/)
> > University of Wisconsin, Madison
> >
> 
> 
>