Jpgs or bmps in RTFs to be stored in CLOBs?

Which should be used in the templates of the various letterheads of RTF documents to be subsequently stored as Oracle 10G CLOBs-- JPGs or BMPs? Although JPGs start smaller than BMPs, the JPGs in RTFs have larger file sizes than those of BMPs in RTFs. Has anyone done any size studies that looked at this in CLOBs?

Are you storing the entire RTF file in the database? If no, then I would suggest using the JPGs. I wouldn't worry too much about the size of the RTF on file system. I would only worry about the size of the binary going into the Database.
But one question. Do you want to use CLOB for JPG and BMPs? Consider using BLOB rather.

Similar Messages

  • How do I convert a pdf file to a jpg or bmp file?

    I have a Mid 2010 iMac OX Yos 10.10.1 with an HP all in one printer/scanner. I am scanning a document to file and it is saving as a pdf I am trying to edit the document and the program i use to edit things like this is Paintbrush. However, for me to use this app to edit my project, the file must be in jpg or bmp format. Scanning the file as a photo to file is not an option either because for some odd reason it only scans the upper right hand corner of the document. I need to get this done TODAY any help on how to convert/change a file format would be AWESOME and would be indebted for life !!!!
    Thank you
    Stacielou

    Scanning to a PDF is a waste of time. I really don't understand why people do that. All you're doing is embedding a raster image (a TIFF, JPEG, etc.) inside a container file (the PDF). It doesn't save a bit of space. Scan images to what they are; a raster file.
    Your problem though is your junky scanning software doesn't work as it's supposed to when you do choose JPEG, or other raster pixel format, and only correctly scans the area you want when you choose PDF.
    Open the PDF in Preview and export it as the highest quality JPEG, or a TIFF. You'll then be able to open it in Paintbrush.

  • Convert JPG to BMP using XI

    Hi
    I would like to transfer the Image file from one Legacy System to SAP R/3 server which then ABAPers can utilize using TCode: <b>SE78</b>.
    But here are the constraints -->
    *) The Legacy System is providing the Image file in JPEG format <u>Only</u>.
    *) SAP R/3 TCode : SE78, can <u>only</u> take the files in BMP format.
    *) Even if you simply change the extension of JPEG file to BMP, then SAP R/3 is <u>not accepting</u> that file which suggest it needs typical BMP file only.
    I referred this thread also
    Error while uploading *.BMP file using SE78
    In this thread user actually resolves his problem after using a tool which explicitly converted a JPG to BMP but they are not using XI.
    Now is their any way with which JPG can be converted to BMP. I found couple of tools but they require the file first ( using browse option ) & then they will convert it, mean you can't call them using XI & provide that file as an argument.
    I just need to know what you all think, is it possible to convert the JPG to BMP using XI or not. Also are you aware of any Java/.NET which can actually take the Image file ( JPG format ) & convert it & provide it back.
    Regards
    - Lalit -

    Hi Lalit,
      I've made a quick search and in my opinion the better thing you can do, is to create a Java routine to convert JPG to BMP.
    you can use JAI (Java Advanced imaging) to read input stream (JPG format), and convert into a BMP format.
    <a href="http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide.pdf">This PDF</a> contains the JAI documentation and some examples.
    I hope it will help.
    Best regards
    Manuel

  • Conver jpg to bmp

    Hi all,
    i need to convert JPG to BMP cause i want to display the picture via smartform.
    i dont want to save the pic throw se78.
    I know that many asked it before ,but i dint find answer.
    Please help!!

    open jpg file .
    in open file in bottom side there is option for save. click on that . it ask to u in which format u want to save it save it to bmp format it save in bmp format.

  • Is it possible to convert JPG to BMP within SAP ?

    Hi SAP Friends,
    We would like to know if it possible to convert JPG to BMP within SAP ? Our users upload jpg file in custom Z transaction and we store that JPG file in Custom Cluster table. Now, we need to get this JPG file, convert it into BMP and store it in SE78. You may ask, why dont we ask users to upload directly in SE78 ?  Our Custom Z transaction does other things, so we cannot ask users to use SE78 and also they get jpg files and not BMP files. So, we need to do conversion internally.
    Any ideas ?
    Niranjan

    Hi Niranjan,
    Unfortunately we cannot.
    Regards
    Aneesh.

  • How to read XML data stored in CLOB in Concurrent prog Output

    Hi All,
    I'm trying to Generate the XML Data as concurrent Program output. I have a PL/SQL package which generated the XML data by using SQL/XML functions. I'm storing the generated XML data in a CLOB variable. But when i try to read the data using fnd_file.put_line(fnd_file.OUTPUT,XML_Data) it doesn't display data more than 32767 bytes.
    Please help me out to understand what could be done to read the data in chunks. I have tried many logic's to print chunks of data but the output tags are either chopped off and errors out saying Tag not found.
    My logic is as below:
    v_handler:= DBMS_XMLGEN.newContext(v_xml_query);
    --Sets NULL handling options
    DBMS_XMLGen.SetNullHandling(v_handler, dbms_xmlgen.EMPTY_TAG ) ;
    --Set special character handling
    DBMS_XMLGEN.setConvertSpecialChars(v_handler, TRUE);
    -- Specified whether to use an XML attribute to indicate NULLness of particular entity in the XML document
    DBMS_XMLGen.useNullAttributeIndicator(v_handler,TRUE);
    -- set Checking invalid chars
    DBMS_XMLGEN.setCheckInvalidChars(v_handler, TRUE);
    -- get the xml data as required
    v_xml_data:= DBMS_XMLGEN.getXMLtype(v_handler);
    SELECT XMLROOT(v_xml_data.extract('/*'),VERSION '1.0').getClobVal() into v_new_xml_Data from dual;
    -- get the length of the xml generated
    v_clob_len := dbms_lob.getlength(v_new_xml_Data);
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The Clob length is :'|| v_clob_len);
    -- logic to process string more than 32767 Processing by each character
    v_offset :=1;
    while (v_offset <= v_clob_len)
    LOOP
    v_char := dbms_lob.substr(v_new_xml_Data, 1, v_offset);
    IF (v_char = CHR(10))
    then
    fnd_file.new_line(fnd_file.output, 1);
    else
    fnd_file.put(fnd_file.output, v_char);
    end if;
    v_offset := v_offset + 1;
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The offset is :'|| v_offset);
    FND_FILE.NEW_LINE(FND_FILE.OUTPUT, 1);
    THe above logic is for character by character which is a performance burden? Please let me know if there is any other work around for this

    Hi,
    Thanks for Replying. I have refered http://blog.oraclecontractors.com/?p=69 and then i added that piece of code. Basically, i'm trying to generate a report using XML publisher. To generate the XML data i'm writing a pl/sql package with SQl/XML functions. DBMS_XMLGEN would help me convert the XML Data as is. When the concurrent program runs this XML data will merge with RTF layout and generate required report. I'm able to generate the Report for data less then 32767 bytes. More than the limit i need to pass chunks of XML data to read as output. That's the reason i'm using fnd_file.output. But it reads only 32767 size at a time.
    WHen i use the given logic, it works perfectly fine, but it loops for each character, for example if you have 30,000 characters it loops the same, which is peformance burden.
    So i tried to write the logic of chunks but still i get the error that XML tag is not found or missing. I'm hoping this is very common issue, but after all my trails, i didn't find the right solution.
    the other logic i tried was :
    v_new_xml_data varchar2(32767)
    v_iterations := CEIL(v_clob_len/v_chunk_length); -- v_chunk_length is 32767 and v_clob_length is length of the XML data stored inthe clob variable
    For i in 0..v_iterations
    LOOP
    FND_FILE.put_line (fnd_file.log,'the loops v_pos :'||i||' and v_clob_length :'||v_clob_len);
    v_new_xml_data := DBMS_LOB.SUBSTR ( V_XML_DATA,v_chunk_length,(i*v_chunk_length)+1);
    FND_FILE.PUT_LINE (FND_FILE.OUTPUT,v_new_xml_data); -- read the output for every 32767 chunks
    FND_FILE.PUT_LINE(FND_FILE.LOG, 'Chunk length is :'||((i*v_chunk_length)+1));
    END LOOP;
    FND_FILE.put_line (fnd_file.log,'out of loop');
    FND_FILE.put_line (fnd_file.log,'length of new xml is '||v_clob_len);
    Please, let me know if you need Further clarifications on the same.

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • How to include XSL-Files stored in CLOBs in XSL-Files

    Hi everybody!
    Using a "standard" XSL-Parser, one can use
    <xsl:include href="to-be-included.xsl" />
    So, if i use the pl/sql xsl-parser, can I do anything simular to this, to include another xsl-document, which is stored in CLOB ?
    Any idea or suggestion ?
    Norbert

    Please refer to the following post:
    how to write DBUri-refs in XSLT stylesheets ?

  • Parsing XML stored in CLOB (PL/SQL)

    Hello,
    I would like to parse XML document like the example below.
    When it is stored in VARCHAR2 column, parsing works well.
    When it is stored in CLOB column, I get error message:
    "ORA-20100: Error occurred while parsing: Invalid char in text."
    The <text> section contains valid characters of ISO-8859-2 encoding.
    If <text> section contains only ASCII compatible characters, parsing works well.
    <?xml version="1.0" encoding="ISO-8859-2"?>
    <body>
    <text> &igrave;&egrave;&oslash;}amiz&ugrave; </text>
    </body>
    Is it a bug? Or where is problem?
    Any help would be appreciated.

    I used such an example to parse several Varchar2 strings in a given DB session:
    BEGIN
    parser := xmlparser.newparser ;
    xmlparser.parsebuffer(parser,xmlout) ;
    domdoc := xmlparser.getDocument(parser) ;
    xmlparser.FREEPARSER(parser) ;
    parser.id := -1 ;
    nodes := xslprocessor.selectNodes(
    xmldom.makenode(domdoc),
    'Positionen/Position') ;
    for i in 1 .. xmldom.getLength(nodes) loop
    node := xmldom.item(nodes,i-1) ;
    -- do s/thing with the node
    end loop ;
    xmldom.freedocument(domdoc) ;
    RETURN(komponenten) ;
    EXCEPTION
    WHEN OTHERS THEN
    if parser.id <> -1 then xmlparser.freeparser(parser) ;
    end if ;
    if domdoc.id <> -1 then xmldom.freedocument(domdoc) ;
    end if ;
    RAISE ;
    END ;
    However, after about 2000 of nodes lists parsed, I get an ArrayIndexOutOfBoundsException from XMLNodeCover. Obviously, I should release the nodes or the nodelist, but I have not found any procedure to do this.
    Pascal

  • How to publish XML document whose source is stored in clob column

    I have to create simple application:
    in one table are stored some information about XML documents (date of creation, etc.) and the document source itself in one (unfortunatelly clob type) column.
    The point is to anable users finding document(s) and viewing it.
    Using forms I can search and display information about documents. But I have no idea how to publish XML document whose source is stored in clob column.
    I am using Oracle Portal 3.0 on NT.
    Thanks in advance.

    Hi Sergio,
    This link might be helpful:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
    Also refer the BLOB Download Format Mask :
    {message:id=9716335}
    Here I have given the format mask for APEX 4.0, which will slightly differ for 3.2.1 and proposed changes
    in the format mask are:
    1) Format Mask: DOWNLOAD
    2) Content Disposition: Inline
    This will be achieved with it:
    >
    But now, my user would like to know if it´s possible that APEX application can OPEN some of these files stored on this BLOB column WITHOUT download it.
    My user would like to see a hiperlink (or button) that, if pressed/acessed, can open a new page (or a page inside application) with the document. He doesn´t need to edit this oppened file. He only wants to see it.
    >
    Hope it helps!
    Regards,
    Kiran

  • Image convert from jpg to BMP (black & white)

    Hi everybody
    here i am converting a jpg file to 2 bit monochrome image.
    Though this program is making the bmp monochrome image of passing jpg image.
    but the program is hanged in between.
    I don't understand the why it is hanging..though it is generating the result.
    please help me to solve the hanging problem.
    =================================================================================
    source output is:
    C:\j2sdk1.4.1_02\bin>java jaiexp.JAISampleProgram6 aish5.jpg
    1
    2
    FarmHouse2.bmp image
    ERROR: it doesn't finish gracefully....!!
    ==================================================================================
    source code
    package jaiexp;
    import java.awt.Frame;
    import java.awt.image.renderable.ParameterBlock;
    import java.io.IOException;
    import javax.media.jai.Interpolation;
    import javax.media.jai.JAI;
    import com.sun.media.jai.codec.BMPEncodeParam;
    import javax.media.jai.RenderedOp;
    import com.sun.media.jai.codec.FileSeekableStream;
    import javax.media.jai.widget.ScrollingImagePanel;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.image.renderable.*;
    import javax.media.jai.*;
    import javax.media.jai.widget.*;
    import com.sun.media.jai.codec.*;
         * This program decodes an image file of any JAI supported
         * formats, such as GIF, JPEG, TIFF, BMP, PNM, PNG, into a
         * convert it to BMP and save it as bmp file
         public class JAISampleProgram6 {
              /** The main method. */
              public static void main(String[] args) {
                   // Define the source and destination file names.
                   String outputFile = "C:\\j2sdk1.4.1_02\\bin\\jaiexp\\FarmHouse2.bmp";
                   Image bwImage = null;
                   /* Validate input. */
                   if (args.length != 1) {
                        System.out.println("Usage: java JAISampleProgram " + "input_image_filename");
                        System.exit(-1);
                   }//if ends
                   * Create an input stream from the specified file name
                   * to be used with the file decoding operator.
                   Image colorImage = null;
                   try {
                        colorImage = Toolkit.getDefaultToolkit().createImage(args[0]);
                   } catch (Exception e) {
                        e.printStackTrace();
                        System.exit(0);
                   }//try catch ends
                   ImageFilter filter = new BlackWhiteFilter();
                   ImageProducer producer = new FilteredImageSource(colorImage.getSource(),filter);
                   bwImage = Toolkit.getDefaultToolkit().createImage(producer);
                   // Create the ParameterBlock.
                   ParameterBlock pb = new ParameterBlock();
                   pb.add(bwImage);
                   // Create the AWTImage operation.
                   //PlanarImage im = (PlanarImage)JAI.create("awtImage", pb);
                   RenderedOp image1 = (RenderedOp)JAI.create("AWTImage", pb);
                   System.out.println("1");
                   try {
                        FileOutputStream stream = new FileOutputStream(outputFile);
                        System.out.println("2");
                        javax.media.jai.operator.EncodeDescriptor.create(image1,stream,"BMP",null,null);
    System.out.println("3");
                        javax.media.jai.operator.FileStoreDescriptor.create(image1,outputFile,"BMP",null,null,null);
                        System.out.println("4");
                        stream.close();
                   }catch(Exception e){
                        System.out.println("Error:"+e);
                   }//try catch ends
                   System.out.println("5");
              }//fun ends
         }//class ends
         class BlackWhiteFilter extends RGBImageFilter{
         public int filterRGB(int x, int y, int rgb){
         int alpha = (rgb >> 24) & 0xff;
         int red = (int)(((rgb >> 16) & 0xff) * 0.3f);
         int green = (int)(((rgb >> 8) & 0xff) * 0.59f);
         int blue = (int)((rgb & 0xff) * 0.11f);
         int bws = ((red+green+blue) > 127) ? 255 : 0;
         return ((alpha & 0xFF) << 24) | ((bws & 0xFF) << 16) | ((bws & 0xFF) << 8) | ((bws & 0xFF) << 0);
         }//class ends
    thanks in advance.
    regards
    - Deepak
    email: [email protected]
         

    Also keep in mind that there are two definitions of bitmap. You want the 2-color version where each bit represents one color or the other. However, thanks to Microsoft, their bitmaps are really just uncompressed strings of RGB values, storing each pixel in multiple bits.

  • Scan on my PSC2210 all in ones does not become a pdf file (only jpg tif bmp or png files)

    I try to scan a document and store it as a pdf file
    on my windows XP I could scan a document as pdf and send it by email
    now i use windows7 with my psc2210 and the only profile i can choose is BMP TIF JPG or PNG
    is there an other possibility?
    Henk

    Hi - I'd recommend running the print diagnostic utility for starters.  It should help isolate the problem and hopefully resolve it automatically.  At the very least, it is a good starting point.
    Hope that helps.
    Say Thanks by clicking the Kudos thumbs up. Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.
    I am an HP employee.

  • How can I do to convert a ".PNG" image file to a ".JPG" or ".BMP" one?

    My problem is to save an image (after processing and with overlay information!) to a standard file (JPG, BMP, ...); if I do it directly with the related VI's, the overlay information is lost; I can save the image in a ".PNG" file, which contains the complete information with overlay, but is not displayable on a LabView-less PC ! How can I do?
    Thank you for your prompt answers.
    Francois

    Hello Francois,
    As you noted, BMP and JPG file formats do not support overlay information. There are two approaches to your problem.
    1. Write to PNG file. PNG is not a LabVIEW specific file format. It cannot, however, be read by simple programs such as Windows Paint. Paint Shop Pro, Photoshop, among other more robust image viewing and editing programs can handle PNG files that LabVIEW generates.
    2. Flatten the overlay information into the main image before writing to BMP or JPG. I don't believe this functionality is built-in to LabVIEW, so this would require some programming, perhaps quite difficult. That is why LabVIEW supports PNG files.
    Jeff Boettcher
    National Instruments

  • Ms9 files export as jpg or bmp

    Hello  everybody,
    My problem and my question is:
    is it possible to export a circuit from Multisim9 as Bmp or jpg?
    Because I can´t print a Circuit at a DIN A3 scape.  
    Without making a screenprint  
    Quick reply much appriciated.

    Hi there,
    There is a screen capture tool in Multisim that will allow you to capture an area of the screen and save it to the system clipboard.  You can then paste the image into a graphics application of your choice (eg. Paint) and save it as a bitmap or jpeg.
    1. Select Tools > Capture Screen Area; this will allow you to select the portion of the circuit you would like to save as a .bmp.  Move/resize the box as desired.
    2. Click Copy
    3. Open Paint (or another program of you liking)
    4. Paste the image
    5. Save the image
    Hope this helps.
    Message Edited by NatashaB on 02-11-2009 11:37 AM
    Natasha Baker
    R&D Engineer
    National Instruments
    Join the NI Circuit Design Community
    Follow Multisim on Twitter!

  • JPG to BMP conversion problems...

    Hi folks, I'm having a bit of trouble. I can't see why BufferedImage img is returning null. Can anyone spot anything?
        private void convertImages() {
            //Read all the files in a given directory in.  If they are images then convert them.
            File file;
            JFileChooser fc = new JFileChooser();
            fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            int returnVal = fc.showOpenDialog(fc);
            if (returnVal == JFileChooser.APPROVE_OPTION) {
                file = fc.getSelectedFile();      // Get directory to file.
                File[] files = file.listFiles();  // Get file array
                outputField.setText("");
                outputField.append("Converting all images in " + file.getPath() +
                        "to bitmap images.\n  Images will be saved in "
                        + file.getParentFile().getPath() + File.separator + "rawdata.\n");
                File outputdirectory = null;
                if(new File(file.getParentFile().getPath()+File.separator+"rawdata").mkdir() || new File(file.getParentFile().getPath()+File.separator+"rawdata").exists()){
                    outputdirectory = new File(file.getParentFile().getPath()+File.separator+"rawdata");
                    outputField.append("Created directory: " + outputdirectory.getPath()+"\n");
                } else {
                    outputField.append("Unable to create a rawdata directory.");
                    return;
                for(File image_file : files){
                    if(isImage(image_file)){
                        outputField.append("Converting " + image_file.getName() + " to bitmap.\n");
                        try {
                            img = ImageIO.read(image_file);
                            output = new File(outputdirectory.getPath()+File.separator+image_file.getName()+".bmp");
                            ImageIO.write(img, "bmp", output);
                            img.flush();
                        } catch (IOException ex) {
                            outputField.append("Problem when trying to convert file: " + image_file.getName() + "\n");
                        } catch (IllegalArgumentException e){
                            e.printStackTrace();
                            outputField.append("Problem with image file. \n");
                    } else {
                        outputField.append("Ignored file " + image_file.getName() + " because it is not an image.\n");
                outputField.append("Job done.\n");
        }I'm getting this output:
    Converting all images in F:\Documents and Settings\Eric\My Documents\testnewto bitmap images.
      Images will be saved in F:\Documents and Settings\Eric\My Documents\rawdata.
    Created directory: F:\Documents and Settings\Eric\My Documents\rawdata
    Ignored file .DS_Store because it is not an image.
    Ignored file ._.DS_Store because it is not an image.
    Converting 1.jpg to bitmap.
    Problem with image file.
    Converting 2.jpg to bitmap.
    Problem with image file.
    Converting 3.jpg to bitmap.
    Problem with image file.
    Converting 4.jpg to bitmap.
    Problem with image file.
    Converting 5.jpg to bitmap.
    Problem with image file.
    Ignored file Results because it is not an image.
    Ignored file testnewtrain.txt because it is not an image.
    Ignored file Thumbs.db because it is not an image.
    Ignored file train.txt because it is not an image.
    Job done.And an error:
    java.lang.IllegalArgumentException: im == null!
            at javax.imageio.ImageIO.write(ImageIO.java:1457)
            at javax.imageio.ImageIO.write(ImageIO.java:1521)Obviously, for whatever reason img isn't initialising, but I can't see why not. It's probably something silly. Any suggestions?
    Eric
    Edited by: escocialite on Apr 9, 2008 2:42 PM

    Obviously, for whatever reason img isn't initialising, but I can't see why not.I ran your code through a test, and as expected, it performed flawlessly.
    It's probably something silly.Can't tell, since it worked for me.
    Any suggestions?Run this SSCCE which works flawlessly or me and see how it works for you.
    package graphics;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Toolkit;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JFileChooser;
    public class LoadAndSaveImage {
       public void convertImages() {
          JFileChooser chooser = new JFileChooser();
          chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
          chooser.showOpenDialog(null);
          File folder = chooser.getSelectedFile();
          File[] files = folder.listFiles();
          for (File file : files) {
             String name = file.getName();
             if (name.endsWith("jpg") || name.endsWith("JPG")) {
                BufferedImage img = null;
                File outFile = new File(folder.getPath() + File.separator + name + ".bmp");
                try {
                   img = ImageIO.read(file);
                   ImageIO.write(img, "bmp", outFile);
                   img.flush();
                } catch (IOException ex) {
                   ex.printStackTrace();
       public static void main(String[] args) {
          new LoadAndSaveImage().convertImages();
    }luck, db

Maybe you are looking for

  • Need help regarding Apache httpd.conf and PHP setup.

    Hi, I am facing problem setting up my PHP and apache setup. I have installed Apache2.2 Root path = C:\Program Files\Apache Software Foundation\Apache2.2 I have also installed PHP in my C:\PHP drive earlier. I moved this PHP folder to C:\Program Files

  • OS X pdf creation error

    I choose "Save as PDF" from print dialog, open the resulting file in Acrobat (v7.0.8) or in Reader (v7.0.9), and print. Output is incorrect: the margins are 25% larger (1 inch going to 1.25 inch all around) and the text and images are smaller, such t

  • Need advice on Pages for commercially printed publications.

    Here is my situation. I have created a publication (a buy/sell classified magazine) using Pages. Pages was recommended to me as opposed to Indesign or Quark as it has some great placeholder options for text and photos and would set up nicely as an ea

  • Purchased 'eCommerce Template' but not able to edit most of it in Dreamweaver?

    I bought a .PHP eCommerce Template for Dreamweaver. I open it up and I can only edit the body of the template, the navigation (including some stupid advertising banners) are 'greyed' out and I can't edit them. What do I need to remove in the code to

  • Kindle fire hd

    skype to skype calls - starts ringing and then cuts out. it says the user is busy but they arent. anyone had this problem ?