Saving image without encoding

Hi,
I'm writing an appliaction that reads jpg files from local file system, resize them and write to disk. During this process most time is taken by encoding bitmap data to jpeg file format. I'm wondering if it's possible to write bitmap data to file without encoding it. Is it really necessary to encode jpg data again as jpg data? or is there any way to do resizing really fast?

My bad, it's pretty obvious that when I have bitmap data it's no longer stored as jpeg data and I can't save it as jpeg on disk.
My problem was solved by very efficient 3rd party jpeg encoding library: http://segfaultlabs.com/devlogs/alchemy-asynchronous-jpeg-encoding.
Currently I'm trying to compile it's latest version because the version I have now has some memory leaks. Wish me luck

Similar Messages

  • Saving image without bits loss/change

    hi there,
    I was trying to save an Image (which i created myself with MemoryImageSource, and proper bit manipulation where red bits hold some characters, very important)and then i saved the image to jpeg by by using BufferedImage and com.sun.image.codec pacakage...its very important that when i read back the saved image, the bits the pixels array are the same as they had been created....but i found them changing...though image looks almost similar....can anybody out there help me how can i recover the same bits in Image pixel array or save it properly using some other technique, so that when i read the image the bits are not changed???
    helps would be appreciated a lot..and your name would appear in my software's about dialog..that's a deal..plz help...
    kushal

    What codec were you using.
    You want one that has "lossless" compression.
    i.e. GIF, TIFF, TGA, BMP, etc.
    JPEG has "lossy compression" although as someone mentioned you may be able to call a method to force it to be lossless.

  • How to see all image file types when saving images without selecting "all files"

    Hallo, and thank you fom reading.
    I am a person who saves a lot of images online in different folders with different names like G - 456 or F - 35.
    I have been using firefox 10.0.2 for a long time because of a bug (I guess) that made it easier to save images.
    When I saved an image it would always show me all the image files in any folder I wanted to save it, and that way making it easier for me to save files with the right names.
    Now with the newer firefox (currently 19.0) whenever I try to save a JPEG I only see the JPEG files in the folder and only way to see the others is by selecting "save as type" all files, but with this I also see all the files that are not images.
    This used to save me a lot of trouble and a bit of time but I dont see anything in the options menu that can help me. Is there a way to recreate this function?
    Thank you for your time.

    I suspect this is a Windows problem. I am surmising the FilePicker uses the Operating System or Desktop facilities. Does Windows 7 offer any other file categories like ''images'' ?
    I do not normally use Windows 7, but may the option depend upon the directory being an indexed one, I ask after finding this thread ''Bring File types tab back'' [http://www.windows7taskforce.com/view/819]
    This question is a duplicate of [/questions/951764]
    Normally I would lock the duplicate question, but in this instance I will leave it open as it is unanswered and someone may give a better reply.

  • Saved image displays differently outside Photoshop

    When I save an image I've been working on in Photoshop, then open the saved file outside Photoshop, the image looks quite different than it does inside Photoshop, much drabber and less saturated. I have both Photoshop and the display program set to sRGB.  I figure that I should have consistency within the monitor, whether it's calibrated or not.  I'm sure I'm missing something basic here.  I'd appreciate any help here, because my prints wind up drab, too.  Many thanks!

    LBJack wrote:
    I overlooked one switch in the Save dialog.  Now the images display correctly.
    Can you be more specific, please?
    Were you saving images without a color profile before, and some application(s) in your system were displaying them improperly?
    Problem is, in that case one wouldn't really expect to see the kind of difference you describe unless your document profile really wasn't sRGB IEC61966-2.1.
    Is it possible you're editing your images in the Adobe RGB 1998 color space?  That could happen if you're opening images through Camera Raw, as the color space it's set to deliver is configured separately (via the link at the bottom-center of the Camera Raw dialog) from the Photoshop defaults.
    By the way, if you don't already know, you can easily set the status block in the lower-left of the Photoshop window to show you the color space of your current document:
    -Noel

  • Saving a image without a background

    I did the tutorial on Removing Image Backgrounds with
    Fireworks. That works great, but I don't know how to save a image
    without a background. I am trying to save it for a website. I have
    Fireworks 8.0. I tried to save it as a Alpha Transparency GIF file
    , but the image is poor. I don't know the correct way of saving
    this.
    Any help would be greatly appreciated.
    Tony

    On Tue, 16 May 2006 20:48:12 +0400, Tony024
    <[email protected]>
    wrote:
    > Ilya Razmanov,
    >
    > I did have that problem viewing under IE 6 on one of my
    pc. My other
    > pc is
    > running IE 7 and it is fine. I am trying to save the
    image without any
    > bacakground so I can upload it to dreamweaver 8.0 so
    that it can be
    > viewed in
    > any IE. I am trying to use a GIF or a JPEG file.
    Official JPEG specs does not allow any transparency at all,
    so save your
    time and quit trying it. GIF only support limited colors (up
    to 256), one
    of that can be assigned as "transparent". So when FW exports
    GIF from a
    source file that have any partial transparency, it "premixes"
    any partial
    transparent color of source with "matte" color. In case the
    latter
    correspond to average color of your page background, and your
    page
    background is not too wild and colorful, and you are not
    using too wide
    partially transparent stuff, it normally work well.
    Among the image formats common on the Web, only PNG provides
    true partial
    transparency. Alas, IE still does not correctly understand
    that part of
    PNG specs that was set years ago. So if you definitely
    positevely can't
    live without transparency things that are available in GIFs,
    PNG plus
    specific CSS and\or Javascript trics is the only way to go.
    However, I'd
    personally make sure I can't live with old limited GIFs
    before going that
    way.
    Ilya Razmanov
    http://photoshop.msk.ru -
    Photoshop plug-in filters

  • Why do the file extensions (.jpg .gif .png) no longer appear when I click on a previously saved image to use that image's file name (particularly important when saving a series of images using the same root name)?

    I save a lot of images using firefox, often times from a large batch or series of images. It used to be that I would click on a previously saved image and the entire file name including the file extension (i.e. image_example.jpg) would appear in the "save as" line. Now when I click on a previously saved file, the file name appears without the file extension (i.e. image_example). Which means I have to manually type .jpg every time. For a large collection of images that I am hoping to use the same root file name and then add chronological numbers at the end, this has become incredibly frustrating, especially as it is a previously unnecessary task.
    I am using a new Macbook Pro and maybe there's something Apple related to this...? It did not happen on my old PowerBook G4. I have file extensions turned on in System Preferences.
    It should be noted that I have searched high and low and have even gone into the Apple Genius Bar where they were just confused as I was and of course ended by urging me to use Safari (shocker!) as it has all kinds of new extensions and bells and whistles. I seriously feel alone on an island with this dumb, hard to google problem. Thanks so much for any help anyone out there might have.
    I mean: is this as simple as changing a setting in about:config?
    Your assistance is greatly appreciated.

    Thanks for your response Mylenium, however like I mentioned multiple times, I did change all of my trackpad/scrolling settings in system preferences.  And if I wanted to use a normal mouse (or a tablet), I would've gotten an iMac instead of a MacBook Pro.  I travel often and work all over the place, not always with access to a decently sized workspace that would be required for using a mouse or tablet.

  • Black background of saved image file.

    Hello All,
    My code is set up to create an image then save the image into a file in JPEG format. Everything works well except the background of the saved image is balck. How can I get a white background on the saved file?
    I have posted my code below. I have allocated 10 duke dollars for the person solves who this? Thank You!!!!
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import com.sun.image.codec.jpeg.*;
    import java.io.*;
    import java.awt.image.BufferedImage;
    public class Test2 extends JApplet {
    public void init() {
    //Initialize drawing colors
    setBackground(Color.white);
    setForeground(Color.black);
    public void paint(Graphics g) {
    Graphics2D g2 = (Graphics2D) g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    Dimension d = getSize();
    int gridWidth = d.width / 6;
    int gridHeight = d.height / 2;
    // fill Rectangle2D.Double (red)
    g2.setPaint(Color.red);
    g2.fill(new Rectangle2D.Double(100, 100, 100, 100));
    g2.setPaint(Color.black);
    g2.drawString("My Rectangle", 125, 85);
    public static void main(String s[]) {
    JFrame f = new JFrame("Test2");
    f.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}
    JApplet applet = new Test2();
    f.getContentPane().add("Center", applet);
    applet.init();
    f.pack();
    f.setSize(new Dimension(400,300));
    f.show();
    saveAsJPEG(applet, 1.0F, "myJPEG.jpg");
         public static void saveAsJPEG(Component component, float quality, String filename)     {
              try          {
                   Dimension d = component.getSize();
                   BufferedImage bimage = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_RGB);
                   component.paint(bimage.createGraphics());
                   Graphics2D g = (Graphics2D)bimage.getGraphics();
                   g.setPaint(Color.white);
                   if(!filename.endsWith(".jpg"))
                        filename += ".jpg";
                   OutputStream out = new FileOutputStream(filename);
                   JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
                   // Create JPEG encoder
                   JPEGEncodeParam jpegParams = encoder.getDefaultJPEGEncodeParam(bimage);
                   jpegParams.setQuality(quality, false);
                   // Set quality to (quality*100)% for JPEG
                   encoder.setJPEGEncodeParam(jpegParams);
                   encoder.encode(bimage);
                   // Encode image to JPEG and send to browser
                   out.close();
              catch (Exception e)          {
                   System.out.println(e);
    }

    I've added 2 lines to your paint, it works now.
    public void paint(Graphics g) {
    Graphics2D g2 = (Graphics2D) g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    Dimension d = getSize();
    int gridWidth = d.width / 6;
    int gridHeight = d.height / 2;
    // make a white background
    g2.setPaint(Color.white);
    g2.fill(new Rectangle2D.Double(0, 0, d.width, d.height));
    // fill Rectangle2D.Double (red)
    g2.setPaint(Color.red);
    g2.fill(new Rectangle2D.Double(100, 100, 100, 100));
    g2.setPaint(Color.black);
    g2.drawString("My Rectangle", 125, 85);
    }

  • How to resize large images without losing quality

    Hello I have an image that I am trying to use as an email. Right now it is 2108 pixels. And for an email it should be 600 px. I created this image in illustrator as vectors and type.
    Whenever I go into image size and i change it to be 600 pixels it gets extremely blurry. I have also tried converting this to a smart object... doesnt work. How do I resize my large image to be smaller without losing quality???

    here is an example sceenshot of the opening dialog (.ai opened directly in Photoshop)
    your illustrator vector should be rastered sharp at 100% actual Pixels in Photoshop
    that is where you want to evaluate sharpness in Photoshop...
    then File> Save for Web & Devices (and drag that saved file icon into an open web browser)
    still no joy, embed your saved image here using the forum's camera icon...

  • N96 capturing but not saving images

    Hi,
    I've had an N96 for ages without issue but recently it has stopped saving images.
    Camera works fine, can take photos and they display on the screen as captured but then, unlike before, they are not automatically saved.
    Have checked memory space - loads left
    Restored camera settings - no change
    Have checked other folders and "all photos" rather than just gallery - still no sign of latest image(s)
    Any help..?

    Rob, the option to retain the original Raw file (in this case CR2) is in conversion to DNG done from the Library module, not to conversions done during importation when Copy as DNG is selected, because in this case the original remains on the card.
    CDPhoto, if, on the Import page, you select Copy instead of Copy as DNG, your files on the hard disc will be CR2s. If your really do want them converted to DNG, in the right side panel select File Handling/Make a Second Copy To: and designate a location. The second copy will be CR2.

  • Saving Images to disk

    I'm going to be making some graph Images, and I'm curious about saving them to disk. I've considered using Quicktime for Java, because quicktime supports so many image types and I need this versatility. The main problem is that, either way, I don't know how to save an Image to a file.
    Any pointers would be much appreciated: websites, sample code using QTJava for saving images, etc.
    --Xander                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Xander
    I think u want to convert the image ( which u draw as graph)into gif or jpge formate for this purpose u can use ACME
    Gif/jpge encoder it is free ware (and it is writen in pure java)for converting image into gif/jpg formate and u can save it into ur hard disk
    U can down the encode from www.acme.com
    and use for encoding the image
    just down lodad the packae and put that package in the current directory and import the package as
    import Acme.JPM.Encoders.*;
    in ur class where u encode the image
    and for encoding the image here is the sample code
    FileOutputStream out= null;
    try{
    File fc=new File("gif/" + "testgif"+".gif");
    fc.createNewFile();
    out = new FileOutputStream(fc);
    }catch(IOException e){System.out.println("Gif Directory not Found");}
    try{
    GifEncoder encoder = new GifEncoder(image,out,true);
    encoder.encode();
    } catch(IOException e){System.out.println("File can't be created");}
    I think this will help u
    vijay

  • Newly saved images not showing in Library

    When using LR 2, I export to PS CS3 to make some final corrections. I save these final images as both a PSD and JPG. When first using LR 2, the newly saved images were showing in the Library>Folders section immediately (without having to synchronize). I was making some preference changes recently I must have changed something that I didn't intend, because now the only way I can get the saved images to display is to synchronize. Anyone know what I need to change back to get my images to immediately show in the Folders (which also allows them to show in the grid and film strip) again?

    This is discussed in excruciating detail in this thread:
    http://www.adobeforums.com/webx/.59b5f883/217

  • "error while saving image"

    has anyone had the problem where, when they select option and tap an image (in my case i pulled one from my email using an image i uploaded from my drive) and gotten an error that says "there was an error saving image" and your only option is 'ok'? i've read other forums and understand that jpeg's are the ideal form, and this had a .jpg extension.
    any thougths anyone?
    so many thanks in advance.
    -wren
    Post relates to: Pixi Plus p121vzw (Verizon)

    hey thanks , but my jdbc pool and driver is fine. what may be the problem and I am not able to change the type to BlobDomain in eo. The type i Blob only may be this is the problem how can I change it to Blob Domain

  • Saving images from camera raw in new CC suite

    Hi Im having trouble re saving images from new adobe cc bridge camera raw, images once saved then show in bridge with no adjustments done in camera raw and the images are downsized to KB size images even from a 9.20mb raw image, Ive looked at setting or rather preferences and totally lost please help!!
    Thank you
    Jon

    This forum is actually about the Cloud, not about using individual programs
    Once your program downloads and installs with no errors, you need the program forum
    If you start at the Forums Index http://forums.adobe.com/index.jspa
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says ALL FORUMS) to open the drop down list and scroll
    http://forums.adobe.com/community/bridge

  • Saving image to a folder not working on azure

    I am saving image
    files to a folder in my application and saving its path in database . Image uploads working fine when I am running locally
    and its path is also storing.When I deployed it on azure it
    gives an error that " An error occurred while processing your request ". I have two tables in my database . First one where text is saved is working fine on azure but image upload thrown this error.
    I am using this code
    to upload
    image and its works fine when I am running locally. Need help ?

    Hi,
    Have you made any progress ?
    May I ask what application is it that you are running ? You mentioned that it works locally but not when deploying to Azure. Have you checked the connections strings?
    If you are still having any difficulty in understanding the code, perhaps you could post it on the below blog.
    http://blogs.msdn.com/b/onecode/archive/2014/08/28/sample-of-aug-28-how-to-store-the-images-in-sql-azure.aspx
    Regards,
    Mekh.

  • Data type for Saving Image in SQL database

    Hi,
        Which is the best way for saving images in the database? Filestream or Varbinary(max)?. Will the Varbinary max comsume much space or it will only take the actual size of the data?

    I've used FILETABLE for storing images in SQL 2012
    You can configure it to have transact and non transact access if you want
    see
    http://visakhm.blogspot.in/2012/07/working-with-filetables-in-sql-2012.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • BW Report Designer - Group level changes

    Dear all, we intent to use BW Report Designer and want to insert page breaks between group level changes so that we get one page per item of a group (as it is possible in Crystal reports). Example: Sales organization is listed in column 1 of our quer

  • Structural authorizations, Funtion module in OOSP

    When we make use of a certain Custom Function module (returning the CP's) in OOSP, standard SAP suddenly also assignes the structural profile ALL to the user id. The Function module itself is working wll, returning all required CP's. The user is well

  • My QuickTime videos on Iweb won't play on my Iphone.

    Ok so i got my Iweb running through MobileMe. The videos run fine on my Imac desktop, but when i visit the site on my Iphone all i get is the Play button with a with a "do not smoke" symbol over it. Heres the link, www.ThomasCampos.com then click Tri

  • Axis error when calling deployed service on weblogic

    Hi, I am trying to deploy the simple HelloWorld service using an .ear file on the weblogic8.1 server. But when I am trying to call the service, its giving me the error: **Fault - ; nested exception is:** ** org.apache.axis.ConfigurationException: Cou

  • Impossible to see the Icon Size slider

    Hi I have installed SL on Leopard and I was expecting to see Icon Size sliders on each finder window and there are none. Is that a bug or is there a way to activate that feature ? Thanks in advance