Re: Lame assistance with PNG Compression

2001-01-25 Thread Jack Reese


Hi Mick, 

As much as I like GIMP, there may be an easier/faster way...

use jpegtopnm, pnmtopng, and cut. should look something like...

for f in *.jpg; do jpegtopnm $f > /tmp/tmp.pnm; pnmtopng /tmp/tmp.pnm > `ls $f | cut 
-f 1 -d "."`.png; done

not tested and I'm a little rusty but i processed a lot of images in this way 
for a user study I did for my dissertation.

regards, 

Jack



   Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
   From: Mick Raynes <[EMAIL PROTECTED]>
   Date: Thu, 25 Jan 2001 13:39:13 +1000
   Content-Type: text/plain;
   charset="iso-8859-1"

   Can anyone offer us assistance with converting/saving a jpg image as png?

   We have around 5000 images which come in at around 150kb each.  We are
   hoping to convert the images to png because down the track we are hoping to
   convert them to thumbnails on the fly.  The images will only be presented on
   the net (assume browser capability)and it is pretty important that we retain
   colour and shadow integrity.  We have limited experience with Gimp however
   we are pretty confident that it will fit the bill and that once we determine
   the process we will be able to batch convert the images.  The original jpg's
   are not all in the same format as they are taken with different digital
   cameras with different settings.  Our aim would be to reduce the original
   jpg 1000 by 1000 and 120kb (as an eg) to a png 500 by 500 and about 30kb.
   As an example we have posted an original jpg image on the net at
   www.tablelandsonline.net.au/_test/lychee.jpg


   Cheers
   Mick




Re: Lame assistance with PNG Compression

2001-01-25 Thread Marc Lehmann

On Thu, Jan 25, 2001 at 01:39:13PM +1000, Mick Raynes <[EMAIL PROTECTED]> wrote:
> Can anyone offer us assistance with converting/saving a jpg image as png?

Use ImageMagick, either from the comamndlien or from perl:

$ mogrify -format png -geometry 100x100 *.jpg

creates png thumbnail files from all your jpegs for example.

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED] |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Re: Lame assistance with PNG Compression

2001-01-25 Thread Jim Freeze

You may want to have a look at:

http://www.daemonnews.org/24/managing.html

This is a very nice tutorial on how to convert jpeg to gif thumbnails from
the command line -- hence can be scripted.


On Thu, 25 Jan 2001, Mick Raynes wrote:

> Can anyone offer us assistance with converting/saving a jpg image as png?
> 
> We have around 5000 images which come in at around 150kb each.  We are
> hoping to convert the images to png because down the track we are hoping to
> convert them to thumbnails on the fly.  The images will only be presented on
> the net (assume browser capability)and it is pretty important that we retain
> colour and shadow integrity.  We have limited experience with Gimp however
> we are pretty confident that it will fit the bill and that once we determine
> the process we will be able to batch convert the images.  The original jpg's
> are not all in the same format as they are taken with different digital
> cameras with different settings.  Our aim would be to reduce the original
> jpg 1000 by 1000 and 120kb (as an eg) to a png 500 by 500 and about 30kb.
> As an example we have posted an original jpg image on the net at
> www.tablelandsonline.net.au/_test/lychee.jpg
> 
> 
> Cheers
> Mick
> 


Jim Freeze
[EMAIL PROTECTED]
--- 
** http://www.freeze.org **





RE: Lame assistance with PNG Compression

2001-01-24 Thread Andrew Kieschnick


On Thu, 25 Jan 2001, Mick Raynes wrote:

> Thanks Andrew.  With indexing we can reduce them to around 70kb?  Any other
> suggestions then for compression of those images to around 30kb which we can
> use the gd library or imagemagick to convert to thumbnails?

You can reduce them quite a bit by converting to indexed color, but for
your example image, I had to go all the way down to 32 colors to get
something around 70kb for 512x384.

I'd recommend using jpeg if possible - gd and imagemagick can both deal
directly with jpeg (unless they were compiled without jpeg support).

later,
Andrew







RE: Lame assistance with PNG Compression

2001-01-24 Thread Mick Raynes

Thanks Andrew.  With indexing we can reduce them to around 70kb?  Any other
suggestions then for compression of those images to around 30kb which we can
use the gd library or imagemagick to convert to thumbnails?


~~-Original Message-
~~From: Andrew Kieschnick [mailto:[EMAIL PROTECTED]]
~~Sent: Thursday, 25 January 2001 2:17 PM
~~To: Mick Raynes
~~Cc: '[EMAIL PROTECTED]'
~~Subject: Re: Lame assistance with PNG Compression
~~
~~
~~
~~On Thu, 25 Jan 2001, Mick Raynes wrote:
~~
~~> cameras with different settings.  Our aim would be to 
~~reduce the original
~~> jpg 1000 by 1000 and 120kb (as an eg) to a png 500 by 500 
~~and about 30kb.
~~> As an example we have posted an original jpg image on the net at
~~> www.tablelandsonline.net.au/_test/lychee.jpg
~~
~~PNG is the wrong choice if you need small files - PNG uses lossless
~~compression, so converting your JPGs to PNG will increase the file
~~sizes quite a bit.
~~
~~For example:
~~
~~Your original 1024x768 JPG was 98635 bytes. Scaled to 512x384 
~~and saved
~~as PNG, it was 272249 bytes.
~~
~~I imagine you'll get similar results for all your images.
~~
~~later,
~~Andrew
~~
~~
~~
~~



Re: Lame assistance with PNG Compression

2001-01-24 Thread Andrew Kieschnick


On Thu, 25 Jan 2001, Mick Raynes wrote:

> cameras with different settings.  Our aim would be to reduce the original
> jpg 1000 by 1000 and 120kb (as an eg) to a png 500 by 500 and about 30kb.
> As an example we have posted an original jpg image on the net at
> www.tablelandsonline.net.au/_test/lychee.jpg

PNG is the wrong choice if you need small files - PNG uses lossless
compression, so converting your JPGs to PNG will increase the file
sizes quite a bit.

For example:

Your original 1024x768 JPG was 98635 bytes. Scaled to 512x384 and saved
as PNG, it was 272249 bytes.

I imagine you'll get similar results for all your images.

later,
Andrew







Re: Lame assistance with PNG Compression

2001-01-24 Thread Tal Danzig

On Thu, Jan 25, 2001 at 01:39:13PM +1000, Mick Raynes wrote:
> Can anyone offer us assistance with converting/saving a jpg image as png?
> 
> We have around 5000 images which come in at around 150kb each.  We are
> hoping to convert the images to png because down the track we are hoping to
> convert them to thumbnails on the fly.  The images will only be presented on
> the net (assume browser capability)and it is pretty important that we retain
> colour and shadow integrity.  We have limited experience with Gimp however
> we are pretty confident that it will fit the bill and that once we determine
> the process we will be able to batch convert the images.  The original jpg's
> are not all in the same format as they are taken with different digital
> cameras with different settings.  Our aim would be to reduce the original
> jpg 1000 by 1000 and 120kb (as an eg) to a png 500 by 500 and about 30kb.
> As an example we have posted an original jpg image on the net at
> www.tablelandsonline.net.au/_test/lychee.jpg

If you are looking for a file size reduction, then I don't think the PNG
format will fit your bill.  PNG files generally (in my experiance) have
a much large file size than a JPEG.  Also, since you source image is already
in JPEG format I don't think you'll see any increase in image quality.

- Tal

-- 
 -- --
|   Tal Danzig |  Libranet Linux  |
| [EMAIL PROTECTED] | The TOP Desktop! |
| http://tal.thepenismightier.net/ | http://www.libranet.com/ |
 -- --

Beneath the rule of men entirely great, the pen is mightier than the sword.
-- Edward G Bulwer