New JEPG image size (disk size) is too low?

Hi,
I am creating new JEPG image using JAI. But the resultant JEPG's size (disk size) is too less than the source image.
How to create a new JEPG with the size equals to the source image?
I guess some where in middle the compression is taking place. How to avoid it?
Thnaks in advance.

post some code ... with code tags
as just reading a jpeg image using JAI and rewriting it back doesn't involve re-compression ... doing something wrong some place.
   File imageFile = new File(filename);
                try {
                Iterator readers = ImageIO.getImageReadersByFormatName("jpeg2000");
                ImageReader imageReader = (ImageReader)readers.next();
                ImageInputStream imageInputStream = ImageIO.createImageInputStream(imageFile);
                imageReader.setInput(imageInputStream, true);
                ImageReadParam imageReadParam = imageReader.getDefaultReadParam();
                int imageIndex = 0;
                Rectangle rectangle = new Rectangle(0, 0,(int)pan2.getWidth(), (int)pan2.getHeight());
                //Rectangle rectangle = new Rectangle(0, 0,1000, 1000);
                imageReadParam.setSourceRegion(rectangle);
                image2 = imageReader.read(imageIndex, imageReadParam);this to read a image
Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
                         ImageWriter writer = (ImageWriter) writers.next();
                         Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:                                        
                         File f = new File(x+".jpg");
                                        try
                         ImageOutputStream ios = ImageIO.createImageOutputStream(f);
                         writer.setOutput(ios);
                                        writer.write(im[x]);
                         ios.close();and this to write the image back on the disk

Similar Messages

  • Scanning: The image size is too big. Please reduce the image height, width, resolution, scaling or output type.

    Good Day.
    I have recently discovered an issue with scanning.  I have tried scanning straight from the printer, through image capture, and through preview.  All yeilding the same results since they are essentailly kicking off the same scanning applet.  I can scan a jpeg formatted file as long as I applet is in the "Hide Details" mode.  If I click on the "Show Details" button, which I need to do to scan to PDF, I immediately receive an error stating: The image size is too big. Please reduce the image height, width, resolution, scaling or output type.
    I'm currently using an HP C5180 printer.   The most recently installed software was Adobe Digital Editions (I installed this to read an on-line e-book).  Not sure if there is any correlation.    Thanks for any help.
    Mac details are:
      Model Name:          MacBook Pro
      Model Identifier:          MacBookPro8,1
      Processor Name:          Intel Core i5
      Processor Speed:          2.3 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache (per Core):          256 KB
      L3 Cache:          3 MB
      Memory:          8 GB
      Boot ROM Version:          MBP81.0047.B27
    Printer access log:
      Source:          /var/log/cups/access_log
      Size:          174 bytes
      Last Modified:          11/21/12 10:09 PM
      Recent Contents:          localhost - - [21/Nov/2012:22:09:16 -0500] "POST / HTTP/1.1" 200 61628 CUPS-Get-PPDs -
    localhost - - [21/Nov/2012:22:09:20 -0500] "POST / HTTP/1.1" 200 61628 CUPS-Get-PPDs -
    Image Capture Support:
      Image Capture Support:
      Path:          /Library/Image Capture/Support/Hewlett-Packard/Devices/HPAiOScan.bundle/Contents/Info.plist
      Version:          2.3.0
      Path:          /Library/Image Capture/Support/Hewlett-Packard/Devices/HPAiOScan.bundle/Contents/Resources/Dev iceInfo.plist
      Version:          2.3.0
    Photosmart C5100 series:
      Status:          Idle
      Print Server:          Local
      Driver Version:          4.0.0
      Default:          Yes
      Shared:          No
      URI:          dnssd://Photosmart%20C5100%20series%20%5B960B9E%5D._pdl-datastream._tcp.lo cal./?bidi
      PPD:          HP Photosmart C5100 series
      PPD File Version:          4.0.0
      PostScript Version:          (3011.104) 0
      CUPS Version:          1.6svn (cups-327)
      Scanning support:          Yes
      Scanning app (bundleID path):          -
      Scanning app version:          -
      Scanner UUID:          CC8DD435-CC8D-D435-CC8D-D435CC8DD435
      Printer Commands:          ReportLevels
      CUPS filters:
    Inkjet:
      Path:          /Library/Printers/hp/cups/Inkjet.driver/Contents/MacOS/Inkjet
      Permissions:          rwxr-xr-x
      Version:          4.0.0
    commandtohp:
      Path:          /Library/Printers/hp/cups/filters/commandtohp.filter/Contents/MacOS/comman dtohp
      Permissions:          rwxr-xr-x
      Version:          2.1.1
      Fax support:          No
      Printer utility:          /Library/Printers/hp/Utilities/HP Utility.app
      Printer utility version:          5.9.1
      PDEs:
    PDE.plugin:
      Sandbox compliant:          Yes

    Hello Sig
    The scanner works with a Windows computer, which proves the device is functional at a cursory level. The drivers are now distributed by Apple and this is an Apple computer. There is no scanning software provided by HP. HP's answer is that Mountain Lion takes care of all of this.  I anticipate that some setting or driver was somehow tweaked since the scanner had been working with Mountain Lion until a few days ago.  The device in question is an Apple product. So, I'm pretty confident that I'm in the right place.
    Regards

  • Image size is too big after "Smart Build Grid"

    The Smart Build Grid feature is awesome. Unfortunately, I have one issue with it- it sometimes zooms the images too much when using the grid feature.
    Specifically, I have a 4 x 3 matrix of rectangular images. With each Zoom from the grid, Keynote zooms too much, so that the center of the image is nicely displayed, but cuz it zooms too much, important info on the sides of the image is cropped out in the magnified image.
    How can I set Keynote to zoom so that the zoomed image is only as big as the longest axis relative to the slide (thereby displaying all information)?
    Keynote 4.01, OS 10.4.11, PPC G4 867 MHz.
    Thank you very much!

    But the image is in
    <mx:DataGridColumn headerText="Input Status" ...
    How can it be fixed?  Please provide your advise.  Thanks.

  • U330+Windo​ws7+disk rate result too low=3.0

    after install Windows7, my disk can only get 3.0 point rate result in system, all other device rate result is normal
    does anyone has the same?
    i didn't install any drivers only energy power driver, Windows7 can regonize almost all the device
    in Vista, my U330 disk can get 5.3 rate point, that why i'm confusing
    Message Edited by ricky119 on 01-13-2009 07:57 PM
    Message Edited by ricky119 on 01-13-2009 09:41 PM

    i found solution
    http://www.ricky119.com/2009/01/12/ati-switchable-​graphics-cannot-use-in-windows7

  • How to increase image size by file size?A

    I'm submitting photos to a stock site that requires a file size of 50 MB per image.
    Is there a way to increase file size to match exactly 50 MB? What I've been doing is trying to guess the size of the image in pixels until it reaches 50 MB but that's not as intuitive.
    Also, what's the best way to increase the image size without too much degradation?
    Thanks!

    Thanks for the answer.. what's the best way to increase the file size while preserving image quality? Should I just do it in one go or increase it multiple times until I reach 50 MB?
    I also noticed that although it said 50 MB in the image size window, once the file was saved and I looked up its info. it was slightly larger.. ?

  • Ipad air back light too low

    Hello.
    I do not know how to increase the back light of new ipad air. The light is too low. Thank you.

    Have you checked: Settings - WallPaper and Brightness?

  • Having trouble with image size on new HP2311x display with 4 year old MacBook. Image too small. Do I have to stay in mirror mode? I have messed with OSD and Image Control menus on display and have gotten nowhere. Help?

    Have just installed new HP 2311x display withe 4 year old MacBook. VGA cable. In mirror mode, at high resolution of 1920x1080, image size on HP display is too small. How can I get it to fill screen? If not in mirror mode, the display looks good, only I can't get the top menu bar (tried to drag it) nor the rest of the desktop. Help?

    Have just installed new HP 2311x display withe 4 year old MacBook. VGA cable. In mirror mode, at high resolution of 1920x1080, image size on HP display is too small. How can I get it to fill screen? If not in mirror mode, the display looks good, only I can't get the top menu bar (tried to drag it) nor the rest of the desktop. Help?

  • Disk image size

    Hello. I have a number of files on an external drive that I would like to save to an encrypted image. The files amount to over 300 gb(and will grow). The external HD is 500gb. Is there a limit to the size of dmg file? Is there a better way to lock/encrypt the external HD rather than using a dmg file? Thanks in advance for your help.
    Greg

    Thanks for quick response! It looks like the "sparse disk image" format is the way to go. One other question: do I need to have space on my external HD to create various sparse disk image(s)? example: external HD free space is 75gb(out of 500gb)The files I want to put into the dmg file is on the external HD(425gb). Do I need to move the files to another HD, create the sparse image(s) and move back the files? Also, when adding files to the sparse disk image will I be alerted when I reach my limit or when there is no space to expand to my set size? Thanks again.
    Greg
    There's no limit to the size of a disk image - at
    least, whatever limit there is is way higher than
    500GB. If you look in Disk Utility -> New Image
    there's a popup menu where you can specify the image
    size and it includes a 'TB' option, so you can scale
    into the terabyte range.
    Using disk images is one of the easiest ways to
    encrypt data, so that's a good start.
    In addition you can create the image as a 'sparse'
    image. This means that you can create a 500GB image,
    but it will only consume the actual amount of disk
    space required by the files it contains. This
    contrasts with a typical disk image which would
    consume 500GB of space even if 499GB of that was
    empty.

  • New Image Size and Resolution in CC

    Hi there.
    Ok, maybe i'm missing something, but how do i reduce the ppi's of a given image in the Photoshop CC? Changing it in the image size, in the Resolution field, it acomplish nothing. It logs an entry in the History panel, but nothing changes in the picture. Did Adobe changed how this works, or it's just a bug?
    Thank you.

    Try setting to real-world measurement, like inches or cm.
    Hi Charles, i think that change in cm/mm/in it's the only way to change the image ppi (in my case save/resample it to 108ppi). Can you confirm that this is correct?
    Anyway when i go to image size (new panel of CC) the w/h are:
    1) grey and always set in pixel with resample flagged.
    2) always set in inches with resample NON-flagged (also if my ruler unit is in Pixel).
    (and actually that is not new behavior. CS6 behaved same way when width and height were set to percent)
    In CS6 and CC i never seen w/h in percent  - where is my error?
    Many thanks!

  • The New  PS CC Images / Size implementation

    Anyone else a little disconcerted by the new setup of 'Image/size' menu?
    Its lost one whole parameter that used to be there by default... Now you have to go find it by click on the drop down and selecting inches.... If I recall it used to show:
    height Pixels
      width pixels
    Height inches
      width inches
    Overall there appears to be MORE information available and more functions one can exercise than the old format.  I guess I'll grow to like it better than the old layout.... but first time out... I missed the old setup.
    How do others feel abou it?

    For reference, this is what the prior version's Image Size dialog showed:
    As I mostly think and work in pixels, I haven't missed the old dialog at all.
    My advice would be to change your default resampling method (via the Preference settings) from Automatic to Bicubic.  Also, if you upsample with the new function, be sure and try the Detail Preserving upsampling scheme.  It's the cat's meow.
    -Noel

  • How to Increase disk image size of SAM

    Hello,
    I am trying to increase the disk image size. I am trying to increase to about 6G, but SAM just refused to load the image.
    So, is there a limit in SAM about the virtual disk size? Or is it limited to the physical memory of the system?
    I have read the thread http://forums.sun.com/thread.jspa?threadID=5239257&tstart=30 and http://forums.sun.com/thread.jspa?forumID=837&threadID=5286038 about enlarging the disk image.
    I am using OpenSparc T2 Arch 1.2 and the int12 boot bundle. I am wondering if I should change to the sasdisk for a try.
    It is strange, that I previously ran the simulator on a Solaris Express (actually 5.11), and it worked fine.
    But now I changed to the Solaris 10, then it failed.
    Thank you.
    Jim

    As it turns out, the way to make the image appear larger on the page is to edit and increase the size of the signature "box" on the pdf (under Forms > Add or Edit Fields), to considerably larger than the form might indicate.  Otherwise, the signature is constrained to the just the size of the small field on the pdf.  Interestingly, as soon as you do so, the signature appears "bolder", likely just because there is more of it.  Thanks for your suggestions!

  • No Image Size menu or Message Size report in New Message window

    Greetings all,
    New iMac user (OS X 10.5.8, Mail 3.6). In scanning Mac Help & the Apple Support forums, I note numerous references for Mail 3.6 to an Image Size Menu button at bottom right of Compose window, and a Message Size window at the bottom left. Have never seen these items. Are they hidden? If so, what is the reveal? Appreciate any assistance. Thank you.
    Gallery Info

    To All,
    After sending in my question, I went back to Mail Help & noticed that images could be attached by dragging from Photo Browser or Desktop or Finder, or by clicking on the 'Paperclip' icon. We had only ever used the 'Paperclip'. Dragged an image from the Photo Browser and both Message Size report & Image Size menu button appeared. Then went back and tried Desktop, Finder & 'Paperclip'. Now, the two items appear, whichever method is used. Doesn't work on all .jpg images, but is sufficient for the need.
    Guaranteed that if original question wasn't submitted, never would have found out how it works. Many thanks to Apple Discussions.
    Gallery Info

  • Larger image size and disk performance

    hey all,
    Granted the majority of users here won't experience issues with larger image sizes, but i'm hoping a few may be able to shed some experience.
    I work with a H3D, Mamiya RB (with various Leaf backs) and also drum scanned film. The issue is that often a single image size can be anything from 150mb upto 500mb, this is excluding any post production changes.
    My current aperture library is on a FW800 disk, but disk i/o is crippling the box and program at the moment. I'm looking at the express slot and wondering who here is running a disk off that and what they feel it's like from a performance perspective.
    An example is a recent location shoot which has a handful of images above 500mb each. Aperture takes around 10-15 mins to startup when this folder is selected (constantly processing the image every time it starts) and this leads to a totally unresponsive OS.
    How are you handling large files with Aperture?
      Mac OS X (10.3.9)  

    On the Quad I process 250Mb+ TIF scans, not often, but often enough. External drives 7200rpm in a Sonnet 500P encl. attached to eSATA muliport card (Sonnet E2P). Performance is equal to internal so far as I can judge.
    I recall the PCMCIA then PC Card bus speed was horrendously slow. Not sure what the Expresscard bus speed is, but it would be a crying shame to attach 300Gb/s burst capable drives (or RAID 5 driving 200Mb+ continuous) to a backend bus capable of a few Mb.
    As Alan notes, a MBP may be OK for field work and tethered shooting, but for the image sizes you have, the preferred solution would be a Mac Pro.
    G.

  • Image size reduction is doing new and unwelcome things to my PNGs

    I've recently upgraded to Photoshop 6 from 5.5. My work involves taking large (1500-3000 pixels square) and reducing them to 256 or below. Upon upgrading to Photoshop 6 I started to notice that the images were looking a little harsher and less blended at the small sizes. I've attached a comparison of the image once it's been resized down to 192x in both programs. The original image can be found here: Image. As you can see, there is definitely a different style of blending going on that leads to a higher contrast at the borders between colors and lines.
    These images are used in a game, and the new CS6 images look worse on the iphone than the old ones. Does anyone recognize what's going on here and how to either fix or mitigate the issue? Any help or insight is much appreciated.

    Hi,
    How are you reducing the image size, i.e. Image>Image Size?
    If your using Image>Image Size, what method under Resample Image is choosen?

  • When dragging an image onto a fresh canvas, the resizing feature presnaps the image into the canvas size. I can confirm that this has not happened to me in previous projects. I've also tested this problem by making a new larger document size and dragging

    Contexts: I am very competent with GFX and have worked on many projects.
    When dragging an image onto a fresh canvas, the resizing feature presnaps the image into the canvas size. I can confirm that this has not happened to me in previous projects. I've also tested this problem by making a new larger document size and dragging in the same render. It snaps again. I don't want to re-size from the canvas dimensions, I want to resize from the render's original dimensions.

    Ap_Compsci_student_13 wrote:
    ok sorry but doesn't sscce say to post the whole code?the first S is Short, and yes, it needs to be all the code needed to illustrate the problem and let use reproduce it. If you were developing a new Web framework, your example might be short, but for a student game it's very long.

Maybe you are looking for

  • Cost allocation on basis on quantity produced

    Hello Experts, I want to allocate overhead cost from different cost centers to production cost centers. This allocation must be done on the basis of quantity manufactured. Please let me know, if this is possible by any means (say for example: assessm

  • Inspection stock not able to move

    Hi For one material there is stock in Quality Inspection.I want to move stock to unrestricted use I am not able to see any Inspection lots in QA32. I tried using MIGO-movt type: 321 no use. All Inpection master data exists Please tell me How can i mo

  • Solaris 8 (Sparc) - Backup Options (Newbie)

    I'm looking for advice on "best practice" options for backing up a Sun server running Solaris 8. Any advice would be greatly appreciated. Many thanks in advance Darren Roberts

  • AirPlay stoppes working as I change to a different zone.

    Using an iphone to play AirPlay, in my different zones- each zone has a apple extreme powering the same wifi network. But as I move from one to another the wifi drops out and is unable to connect, therefore continue to play music.

  • Version Management on SAP Script Forms

    Hello,     Is there a version management for SAP Script forms like what we have in ABAP programs? I need to revert back the old version of my SAP scrip form like what I used to do in an ordinary ABAP program. Is this possible? Need your views on this