Jpg to png in J2ME device..

I am considering doing a converter that could read JPG images from server and converts then to PNG and shows on device. I wonder what is the basic approach in case like this. I know there is already made solutions for this, but I want to make one in order to understand more these kinds of things.
Thanks in advance..

I tried the server route, but a 30kb JPEG becomes a 210kb PNG, and for downloading over the air on a cell phone, that 7x increase is a painful problem. Downloading the JPEG directly to the J2ME device is definitely the way to go. Pretty lame that J2ME doesn't currently support JPEG natively.
After many nights of searching the Net for an answer to this question, a kind soul pointed me to the following site, which is 80% of the answer we're looking for:
http://webuser.fh-furtwangen.de/~dersch/
Helmut Dersch
has written/ported a JPEG Decoder that can run in J2ME:
JPEGDecoder: pure-Java JPEG-Decoder for limited Java APIs (e.g. J2ME)I know that it works (he has a sample app that actually runs on my Treo with a panoramic JPEG image loaded from the resource files). Unfortunately, I haven't been smart enough to write the code yet that would download a JPEG off the web and render it on the screen (without all the Panoramic stuff). Should be simple, though.
I am sure that it will take 90 seconds for one of you smart folks. If you actually write the code to do this, PLEASE post the source code so that all of us will learn!
Thanks!!!

Similar Messages

  • Changing .bmp to .jpg to .png

    Hi,
    I have a bunch of .bmp files that need to be converted to .png files. Some of the .bmp files cannot be made into .png files without being converted to .jpg files first.  The first action does the .bmp --> to .jpg.  The second action finishes up the process converting the .jpg to .png.
    I would make the change over into one long action: Process1.  But when I convert one file to another and save to another location, I need to open that same file name with the different extension and then run the second process.
    So I've got two separate actions now and run one after the other.  Being on the lazy side, you know, one less click is a wonderful thing..., can I combine the actions or is there a way to do Process1 all at one time?
    thanks for all help!

    make an action that saves a file to .png and then run it on the rest of the files. If you want to save using 8bit png then use File->Save for Web & Devices and make sure that you select png-8 otherwise use File->Save. Note that if you save using the Save for Web & Devices command then you will save all your files in the folder specified by it, it cannot be overriden using the Batch command. If you save the file using 24bit png(using File->Save) then when using File->Batch to automate the process make sure that Override Action "Save As" Commands is selected and select the folder where you want to save your files

  • How do I stop iWeb turning my .jpgs into PNG's ??

    Hi
    No one on a PC can print out my iWeb pages because when I drag a pic into iWeb it auto makes it a PNG. (unreadable from some PC's) How can I stop this from happening so that people can print ok from my site?
    Thank you
    Jim Rhodes
    http://web.mac.com/jimpsky/iWeb/Craiganor/Craiganor.html

    Thnx Mark
    I figured iWeb might be doing this and it seems impossible to fix. Here, as always I optimize all my pics in PS for the web as jpg,s. I've noticed iWeb actually makes some of my pics bigger! after optimizing if I resize the pic in iWeb. It shouldn't do this anti optimization.
    I have another site on a different .mac account that, after growing past a point, now converts all the text to jpg so no text can be copied. http://web.mac.com/hueynrolf/iWeb/BWA/Home.html
    but still here no PNG file conversions.
    The "Craiganor" site in question, was added to an existing iWeb project (Domain) ;
    http://www.rospalmerinteriors.com/RosPalmerInteriors/news.html
    Rospalmerinteriors, published to a .com and mirror on .mac, works well. With a little tweaking i managed to prevent it from converting text to jpeg and no auto jpg to PNG conversions. The Craiganor site does convert the jpgs to PNG!
    1. Is this occurring because Craiganor is the second site ? I suspect so.
    2. Will rebuilding the site (would rather not) in its own iWeb Domain Solve this?
    2. If so and I rebuild the site with it's own Domain, separately publishing Rospalmerinteriors and Craiganor to the same .mac, will I encounter functionality problems with the .mac specific aspect ?
    Many thanks
    Jim

  • How do I batch convert .ai to .jpg or .png in Bridge CC 2014?

    I have found where you could "Export" them out in older versions of Bridge but no "Export" function exist in CC 2014.

    You could do it like this: http://www.santoshgs.com/blog/189/how-to-batch-convert-png-to-jpeg-using-photoshop-cs2/
    But can I be honest? I'd do that with a more efficient and far faster conversion utility like IrfanView. Photoshop is incredibly slow for this type of work. For example, I did a quick test to demonstrate the difference in performance:
    folder with 10 images in jpg format, 5600px by 5600px. Simple jpg to png batch.
    Photoshop: over six minutes.
    IrfanView: one minute and 40 seconds.
    That's a rather big difference - and with large numbers of images I just do not have the time to wait for Photoshop to finish the job. It's too slow.
    Another issue is that during the conversion process Photoshop cannot be used - while with a simple conversion utility you can leave it running in the background, and continue to use PS for other work if required. This matters if you have hundreds of images to convert.
    Btw, Irfanview (windows only) is free to download @ http://www.irfanview.com/
    The batch processing you can find under File-->Batch Conversion <b>
    ImageMagick is also free and open source. It is a command line tool, and easy to use for conversions.Will also work on a mac. But it is much slower than IrfanView, a tad faster than PS.
    http://www.imagemagick.org/script/convert.php
    http://www.ofzenandcomputing.com/batch-convert-image-formats-imagemagick/

  • Converting a pdf to jpg or png

    Hi all
    I need to convert pdf file page into an image of either jpg or png format.
    Thought pdf-tools.com is offering some java API to do that (which i have tried with trial version, working fine).
    is there any free API either from ADOBE itself or some other open source projects?
    please do let let me know
    Take care
    mahanare

    Hi,
    I've already used iText to produce nice PDF's via a WEb Application using Java Servlets.
    You can import images (jpg, png) into the Pdf you are creating.
    But I'm doubt that you can convert the PDF files created to image files ?
    I would be interested about the functions to use within iText in order to achieve that.
    Thanks
    Philippe

  • Some photos on my iPod are substituted JPG or PNG. I can't make them appear again. What do I do?

    Some photos on my iPod are substituted JPG or PNG. I can't make them appear again. What do I do?

    What does "Some photos on my iPod are substituted JPG or PNG" mean?
    How did they get on the iPod?
    Substituted how?

  • Does Anyone know how to transfer JPG to PNG file?

    I want transfer image file JPG to PNG in Java code for MIDP using..
    Dose anyone know how to do it?
    Plz help me..Thanx...

    Use the JAI for limited PNG support. Or simply search the web for "PNG Java"...

  • Photos changed from jpg to png?

    I just bought a new iphone 4 from the Apple store because my old iphone 4 had a broken power button that could not be replaced. This iphone was working fine- it updated to iOS 7 and all of my contacts and apps synched onto it fine. Now I'm having a problem with my pictures. When it uploaded the pictures I had on my previous backup, it uploaded them in png format, not as a jpg. Now every picture I take on the iphone 4 is in png format which will not upload onto my iphoto on my MacBook Pro (which is from 2009). Ang suggestions on what to do?

    Since an iTunes upgrade in May 2011, iTunes converts jpg to png if the artwork is added to multiple tracks using the get info window.  Artwork added to individual tracks in the get info window, or artwork added to multiple tracks in the artwork box on the browser (the lower left corner where it says "Drag Artwork Here" if there is no artwork).
    Now, to add jpg artwork to multiple tracks, the artwork has to be added via the artwork box on the browser.  If there is existing artwork, this must be deleted first or the new artwork will not replace it bet will be added as a second file (this can be seen on individual track in the get info window).
    The problem with conversion to png format is that the size is increased (doubled or more).
    There are two problems with adding to the artwork box for multiple tracks.  First is the issue that previous artwork must be deleted since adding to the artwork box does not replace existing artwork.  Second is an issue which occurs if you are also playing tracks while adding artwork.  This is due to another problem with iTunes; that the artwork box changes automatically from "Selected Item" to "Now Playing".  If it is set to "Now Playing", the artwork is added to that track, and not the selected tracks.  Also, it takes a short time to add the artwork, and if iTunes switches to the next track in the middle, it stops adding artwork to the selected tracks..
    So, to add jpg artwork to iTunes, you need to do the following:
    1. Delete existing artwork from the tracks.
    2. Make sure the artwork box title is "Selected Item" and not "Now Playing"
    3. Drag new artwork to the artwork box
    4. Make sure the artwork box does not switch to "Now Playing" while artwork is being updated.
    I recommend not playing tracks while adding artwork, to avoid problems with either updating the wrong tracks or not completely updating the selected tracks.
    And I wish iTunes was changed back to the way it was.  Using the get info window did not have these issues.

  • JPG to PNG?

    Hi,
    My designer just sent me some background texture files in jpg format but they actually need to be in png. Am I able to convert these jpg to png without losing quality, or do I need to ask her to generate the png from the original file?
    Thanks,
    KiSS

    Yes, in general.
    The only hurdle would be transparency. JPGs do not support transparency. So if you need transparency, and the originals have transparency, you would be served by going back to original images.

  • Optimial file format - gif, jpg, or png automatic?

    Is there a way to have photoshop to easily and automatically determine and save a file in the format that is the smallest file size?  I upload dozens of files to my web site each day, and instead of saving as each format to see which one is smaller, I'd like photoshop, or another program, to automatically determine which format will result in the smallest file.
    Thanks,
    DownAndOut

    It seems odd to me is that more image editing programs do not offer the functionality that I am inquiring about. I found hundreds of posts accross the internet that say "save as .jpg/.gif/.png to see which one is the smallest". This seems time consuming when a program (when saving) could display the size that the file would save in each format, allowing the user to select which format they wish to save in.
    The "general" rule that photographic type images save smaller as .jpg may be the case in general, but does not apply on our web site http://www.mysavings.com. Our content editors upload 300x250 and 120x60 (thumbnails) of the same image. Even when the images are of photographic nature, the 120x60 seem to usually 50% smaller as .gifs, while the same image as 300x250 are 25% smaller .jpg. 50% on is large and really affects loadt ime when we are talking about 2 images on the page. So we are having to adopt a general rule that save the 120x60 as .gif and the 300x250 as .jpg, regardless of the content of the picture. Our image editors do not have the time to save in both formats just to see which is smaller. 
    It just seems logical that a program could show you the resulting file sizes for each format when saving so you can choose which is smaller. Regardless of affecting quality, because I see no noticeable difference in quality when I just save these images as a .jpg or .gif, the only difference I notice is the file size.

  • How to convert postscript file to jpg or png

    Hi,
    I have to convert the postscript file into jpg or png image and need to display it in GUI.
    Can anyone suggest me how to do it or is there any third party jar available in java so that i can make use of it.
    Thanks & Regards

    i'm not sure what you're trying to do but:
    1.  if you have flash pro, you can open the fla and publish bitmaps of any display object
    2. rename the fla extension to zip and unzip it to utilize its bitmaps.

  • Making jpg or png images in Java...

    Hello everyone,
    Can anyone please post a simple class that simply does the following:
    //Create some sort of image
    Graphics g = image.getGraphics();
    g.fillRect(...);
    //Export the image to a jpg file: e.g. a.jpg/a.png
    Thank you

    import java.awt.*;
    import java.awt.geom.Ellipse2D;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class Imaging {
        public static void main(String[] args) throws IOException {
            BufferedImage image = getImage(200, 200);
            // jpg, png, bmp (j2se 1.5), gif (j2se 1.6)
            String fileName = "imaging.jpg";
            saveImage(image, fileName);
            showImage(fileName);
        private static BufferedImage getImage(int w, int h) {
            int type = BufferedImage.TYPE_INT_RGB;
            BufferedImage image = new BufferedImage(w, h, type);
            Graphics2D g2 = image.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(new GradientPaint(0,0,Color.red,w,h,Color.orange));
            g2.fillRect(0,0,w,h);
            g2.setPaint(Color.cyan);
            double d = Math.min(w, h)/4;
            g2.fill(new Ellipse2D.Double(w/2-d/2, h/2-d/2, d, d));
            g2.dispose();
            return image;
        private static void saveImage(BufferedImage image, String fileName)
                                              throws IOException {
            File file = new File(fileName);
            int dot = fileName.lastIndexOf(".");
            String ext = fileName.substring(dot+1);
            ImageIO.write(image, ext, file);
        private static void showImage(String fileName) throws IOException {
            BufferedImage image = ImageIO.read(new File(fileName));
            JOptionPane.showMessageDialog(null, new ImageIcon(image),
                                          fileName, JOptionPane.PLAIN_MESSAGE);
    }

  • Photoshop CS5 question - trying to save a name with extension .jpg or .png

    Hi,
    If I open a new file and go to save it the extension names show up (.jpg or .png). However, if I open an illustrator file in Photoshop and try to save it the extension names are not there (it's just saving them as the proper format, but I want the files to have the .jpg or .png in the name without me typing them in myself.
    Anyone know why this is or how I can fix it?

    rob3rockstar wrote:
    Hi,
    If I open a new file and go to save it the extension names show up (.jpg or .png).
    That is not true.  A net document save may default to .jpg.  I do not ever remember a save defaulting to .png unless a the document was opened from a .png file.  If the new document has layers save should open display the save as dialog and default to file type .psd.
    rob3rockstar wrote:
    Hi,
    However, if I open an illustrator file in Photoshop and try to save it the extension names are not there (it's just saving them as the proper format, but I want the files to have the .jpg or .png in the name without me typing them in myself.
    I do not have or use Illustrator however I do not believe that  Photoshop can open all illustrator file types like .ai.  Photoshop may be able to import and export .ai file.  If you have a document open in Photoshop you should be able to use "Save As"  and  chose the file type you want to save from the file type pull down menu. However .ai will not ne in the list.

  • Tiff to JPG or PNG converter

    Is there a program that can convert a group of TIFF formatted images to something else, like JPG or PNG? Right now what I'm doing is opening up Preview and then having to save each image one by one, which is time consuming. Is there a command line utility that I could do this with, or is there anything in OS X that does it?
    Thanks.

    If you're talking about screenshots - you can set what format they get saved to using the "defaults" command in a Terminal window (Terminal.app is located in the /Applications/Utilities folder). For example to set the type to jpg (or png or tiff or pdf or not sure what others are possible - perhaps someone knows all the types that can be used):
         defaults write com.apple.screencapture type "jpg"
    If you want to change the location the screencaptures get saved to:
         defaults write com.apple.screencapture location "~/Desktop/Screenshots"
    then you need to
         killall SystemUIServer
    good luck..........

  • How do I convert file to gif, jpg, jpeg, png, bmp, or swf

    I mad a page in COMIC LIFE. I saved it, then when i went on photobucket.com, it gave me a message saying
    The file "" does not have a valid image extension.
    Valid image extensions are: gif, jpg, jpeg, png, bmp, swf.
    HOW DO I CHANGE IT?
    Thanks

    I have never used Comic Life, so I can't tell you how to do it from there. But you could open it in Preview. Control-click the page in the Finder and choose Open with... set it to Preview. Once in Preview, do a Save As and change the Format there.

Maybe you are looking for

  • Hp Colour Laserjet CP5225dn slow printing on AutoCAD

    Hey all, Hope you have a good day. I have a CP5225dn printer which is giving me problem when printing drawings. It basically takes 3 minutes for drawing to be printed and is really frastrating. Nevertheless, the same printer hardly takes half a minut

  • IPhone 4S Photos directly to an external drive

    Does anyone know how to transfer iPhone 4S photos directly to a WD external hard drive without the need to first transfer to iPhoto?

  • Newbie has RMAN restore questions

    I am new to Oracle and RMAN. We had a failure on a Windows Server running Oracle 9.2. I copied the backed up datafiles from RMAN to a recovery system. The production system is running again. I need to restore the old data on the recovery system, whic

  • Basic design questions

    I want to design an icon for an Android app in CS5, and there are lots of design guidelines that need to be followed, and there are a couple I am unclear of: 1.) they have to be caricatural in nature - how would you interpret this? what does this mea

  • Materialized views  not updating

    I'm having trouble with getting a materialized view with fast refresh to update. I'm working between two schemas and have the global query rewrite privilege for both users. I've run the catrep.sql script to make sure it had been run and find that it