Java v/s ImageMagick  
Author Message
Yogee





PostPosted: 2005-9-6 18:12:00 Top

java-programmer, Java v/s ImageMagick Hi all,

I have to write a application to concatenate couple of gif images to
generate a animation. The basic problem is that the file size of final
animation is very huge.It's uncompressed.

Can some body point 2 good library which generate proper compressed,
small size gif images.

-- PRADEEP SHARMA

 
Roedy Green





PostPosted: 2005-9-6 18:40:00 Top

java-programmer >> Java v/s ImageMagick On 6 Sep 2005 03:12:24 -0700, "Yogee" <email***@***.com> wrote or
quoted :

>Can some body point 2 good library which generate proper compressed,
>small size gif images.

Here are image processing programs that have batch modes for doing
things, PSP, the Gimp. Perhaps the trick in to compose some sort of
script and leave it up to the package to deal with managing memory.

I was reading today bout how the Gimp uses tiling to process images,
allowing for images limited only by disk space.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Andrew Thompson





PostPosted: 2005-9-6 19:44:00 Top

java-programmer >> Java v/s ImageMagick On 6 Sep 2005 03:12:24 -0700, Yogee wrote:

> I have to write a application to concatenate couple of gif images to
> generate a animation.

Is the requirement to create an animation, or a cycling GIF animation?

The first is a lot easier (both technically and legally) than
the second.

>...The basic problem is that the file size of final
> animation is very huge.It's uncompressed.

How big are the original images (in bytes, rather than vague
word descriptions) and how big is the final image?

> Can some body point 2 good library

Well I was recently working with ..wait, that was
only *one* library, I better not mention it.

[ Hint: ask for any information, rather than specify
conditions on the information. ]

>..which generate proper

Define 'improper'.

>...compressed, small size gif images.

Define 'small sized' (in bytes).

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"If we fall, others are rising.."
Paul Kelly 'From Little Things, Big Things Grow'
 
 
Oliver Wong





PostPosted: 2005-9-7 4:53:00 Top

java-programmer >> Java v/s ImageMagick
"Andrew Thompson" <email***@***.com> wrote in message
news:s7a84aota31z$email***@***.com...
> On 6 Sep 2005 03:12:24 -0700, Yogee wrote:
>> Can some body point 2 good library
>
> Well I was recently working with ..wait, that was
> only *one* library, I better not mention it.
>
> [ Hint: ask for any information, rather than specify
> conditions on the information. ]

I think the OP meant "Can somebody point me *TO* a good library?" rather
than "Can somebody point me to *TWO* good libraries".

Also, if we're going to be pendantic, you should probably phrase it as
"Ask for information that is both helpful to you and which requires the
minimal amount of effort for other people to provide, so as to maximize the
chance that the effort required is below those people's laziness-threshhold
and thus the chance that they actually help you." Otherwise, to ask for
*any* information might yield results such as "The earth is round", "I like
cheese", "42", etc.

That being said, I agree with Andrew's request for more specifics. What
kind of file size limitations are we looking at here?

- Oliver


 
 
Andrew Thompson





PostPosted: 2005-9-7 10:22:00 Top

java-programmer >> Java v/s ImageMagick On Tue, 06 Sep 2005 20:52:47 GMT, Oliver Wong wrote:

> "Andrew Thompson" <email***@***.com> wrote in message
> news:s7a84aota31z$email***@***.com...
>> On 6 Sep 2005 03:12:24 -0700, Yogee wrote:
>>> Can some body point 2 good library
>>
>> Well I was recently working with ..wait, that was
>> only *one* library, I better not mention it.
>>
>> [ Hint: ask for any information, rather than specify
>> conditions on the information. ]
>
> I think the OP meant "Can somebody point me *TO* a good library?" rather
> than "Can somebody point me to *TWO* good libraries".

Oh-oh! (slaps self) Don't I look a complete fool!
My apologies to the OP.

OK. The *one* 'package' I encountered that worked for me
is available here.. <http://fmsware.com/stuff/gif.html>

I was feeding 230-240 320x160 PNG's to form a single animation
in a pass. The resulting files were around 9Meg.
As far as I recall, I had to pump the Xmx memory up to 512Kb
before I could complete the run with no OutOfMemoryErrors.

> Also, if we're going to be pendantic, you should probably phrase it as
> "Ask for information that is both helpful to you and which requires the
> minimal amount of effort for other people to provide, so as to maximize the
> chance that the effort required is below those people's laziness-threshhold
> and thus the chance that they actually help you."

Wow. That's a mouthful. I'll stick to what I
currently say and take my chances. ;-)

>...Otherwise, to ask for
> *any* information might yield results such as "The earth is round", "I like
> cheese", "42", etc.

Yeah, yeah. No communication is perfect. (shrugs)

> That being said, I agree with Andrew's request for more specifics. What
> kind of file size limitations are we looking at here?

Yep. 'Spill the beans', OP. We still don't have a
good enough idea of what you are doing to make more
definitive recommendations.

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Ain't it dark, wrapped up in that tarp.."
Dixie Chicks 'Goodbye Earl'
 
 
Andrew Thompson





PostPosted: 2005-9-7 10:34:00 Top

java-programmer >> Java v/s ImageMagick On Wed, 07 Sep 2005 02:22:19 GMT, Andrew Thompson wrote:

> As far as I recall, I had to pump the Xmx memory up to 512Kb
> before I could complete the run with no OutOfMemoryErrors.

..err. That would have been 512*Mb*, rather than Kb...

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"I got a raw deal, so I'm lookin' for a steel.."
Tricky 'Black Steel'
 
 
Yogee





PostPosted: 2005-9-8 13:18:00 Top

java-programmer >> Java v/s ImageMagick Sorry for providing incomplete information.


Basically I will be getting a picture of a object, (it can be anything
like human pic, mountain etc generally sized around 10 to 50 kB). I
would like to apply some transformations or animation on the image and
send it back to the client sending the static image.

I dont know if transformation is the right word. But it would be like
making waves on the gif image, so that it looks different from the
original image. But the restrication here is that the size of returned
imaged should not be more than 90-95 KB. I have used ImageMagick C api
before( for image conversion gif => jpg ), so obviously stumbled upon
the same. But the result generated are not so good. The resulting image
file size is around 300 KB.

Here is the link , I tried

http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/

http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/koala.gif
( 4 KB )
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/anim_mixer.gif
( 300 KB )

And on internet it says ImageMagick doesnt produce compressed gif
files. So, I posted it here about requirement of some good library that
can produce image of the same quality but of a lesser size.



I tried using Imagemagick koala.gif

 
 
Andrew Thompson





PostPosted: 2005-9-8 14:34:00 Top

java-programmer >> Java v/s ImageMagick On 7 Sep 2005 22:17:34 -0700, Yogee wrote:

> Basically I will be getting a picture of a object, (it can be anything
> like human pic, mountain etc generally sized around 10 to 50 kB). I
> would like to apply some transformations or animation on the image and
> send it back to the client sending the static image.
..
> http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/
>
> http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/koala.gif
> ( 4 KB )
> http://www.cit.gu.edu.au/~anthony/graphics/imagick6/distorts/anim_mixer.gif

That transforamtion is better done in an applet/application,
then the user never needs to upload it *or* download the result!

> And on internet it says ImageMagick doesnt produce
> compressed gif files.

It is posibly related to the LZW patent, my recent attempts
to find a library for animated GIF's that was both open
source and LGPL are chronicled here..
<http://groups.google.com.au/group/comp.lang.java.programmer/browse_frm/thread/c6558680e67a1f8e/b95649ca0fd757bf>

In the end, alothough I found the package mentioned earlier, to
creat GIF's, it was deemed unsuitable in that it did not have a
clear enough license. The code, as most other code that deals
with (compressed) animated GIF's, has all the usual '..I am not
a lawyer but, this code does it..' type disclaimers.

That was not good enough for the project I was working with.

Note that I followed up with Unysis to try to ascertain these 'new'
compression algorithms they are patenting, to check that the code
I had did not use them, but thus far, my requests for information
have been ignored.

After doing a quick search of the US patents site for Uniysis/GIF/LZW,
I think Unysis' statements about new patents are 'a bunch of
bullsh*t' designed to keep potential users confused, ..but IANAL.

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"We're lost in a cruel paradise.."
New Order 'Someone Like You'