Originally posted by Vivek Viswanathan:
I have been working on writing J2ME applications for the last few months or
more. I have written MIDLets that display certain images from the net on my
mobile phone. Since images have to displayed on the mobile phone I have to
convert the image into PNG format so that it can be displayed on the mobile
phone, I am not performing the image conversion on the mobile since there
are not ready made APIs to do the job, so the image conversion is done in a
intermediate server that sits between the mobile applicaion and the actual
application that provides the image.
Writing the program to convert a jpg or a gif image to a PNG image does not
prove to be a major problem, but it does include a performance hit, since
the midlet is no longer getting the image from the source web site it has
to tunner through my web site that converts the original jpg image into png
format ( is there a better or a faster method to do this ?) .
I was wondering as to why PNG was selected as format of the image that can
be displayed using J2ME, when most of the images on the net are jpg or gif
images. Image conversion is not the only problem when I convert the image
from JPEG to PNG, there is major increase in size ( tested for
16 bit 128x128 images) which reduces the network performance even more
( that is particulary a problem since mobile networks are slow unless you
are using GRPS which should be a bit faster but not that fast ).
So here is what my intermediate servlet does
1. Fetch the actualy image ( jpg/gif format)
2. Reduce the size (dimentions)of the image so that it can be displayed on
the mobile screen.
3. Reduce the color depth of the image to 4096 colors ( this is required
since my Nokia 7210 can display only 4096 colors so it does not make sense
sending truecolor images which are als larger in size )
4. Convert the image into PNG format so that it can be displayed on the
mobile phone using J2ME.
This image conversion really seems useless for my Nokia 7210 since it can
directly display jpg images, but not through j2me since j2me only allows
png images to be displayed. I dont think I can use the Nokia j2me API to
display jpg images ??? Can I ??? --- If that is possible please feel free
to fire me!!
So is there any particular reason to choose PNG over other popular internet
imaging format ???
And I dont think I ever heard of PNG before this.......