List Info

Thread: Re: gm convert with binary input




Re: gm convert with binary input
user name
2008-05-30 13:27:08
thanks bob,

i am getting the data stream from amazon s3 as a big ole
string of
characters then am using a scripting language to construct
the gm
command.  the redirection's arent really relevant to my
situation.  or
are they?






On Fri, May 30, 2008 at 2:20 PM, Bob Friesenhahn
<bfriesensimple.dallas.tx.us> wrote:
> On Fri, 30 May 2008, Billy Fowks wrote:
>
>>
>> i am trying to input a string to gm convert and am
having some trouble
>> with the syntax.  here is what i am doing:
>>
>> gm convert -resize 600x600  - [data stream here] 
jpg:-
>>
>> is this possible?
>
> I am not sure what operating system you are using or
what "[data stream
> here]" means, but on Unix, this works:
>
>  cat seaworld.jpg | gm convert - jpg:- > crap.jpg
>
> and this works too:
>
>  gm convert - jpg:- < seaworld.jpg > crap.jpg
>
> and even this works:
>
>  gm convert jpg:- jpg:- < seaworld.jpg >
crap.jpg
>
> and since the input format is (usually) detected and
preserved, even this
> works:
>
>  gm convert - - < seaworld.jpg > crap.jpg
>
> and of course if I insert your desired operation, that
works too:
>
>  gm convert - -resize 600x600 jpg:- < seaworld.jpg
> crap.jpg
>
> If this somehow fails to work, then you need to upgrade
your GraphicsMagick.
>
> Bob
> ======================================
> Bob Friesenhahn
> bfriesensimple.dallas.tx.us, http://w
ww.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMag
ick.org/
>
>

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-helplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gra
phicsmagick-help

Re: gm convert with binary input
user name
2008-05-30 15:05:10
On Fri, 30 May 2008, Billy Fowks wrote:

> thanks bob,
>
> i am getting the data stream from amazon s3 as a big
ole string of
> characters then am using a scripting language to
construct the gm
> command.  the redirection's arent really relevant to my
situation.  or
> are they?

I see.  In that case you need to be aware of the Unix
backtick 
convention to obtain replacement input from sub-commands:

  gm convert - `mycommand` jpg:-

but it is also good to be aware that each OS has its own
command line 
length limitation.

Bob
======================================
Bob Friesenhahn
bfriesensimple.dallas.tx.us, http://w
ww.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMag
ick.org/


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-helplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gra
phicsmagick-help

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )