How to decrease the size of image using a java peogram

Hi All,
I want to decrease the size of an image from MB to KB. I have some images of size around 1MB to 3MB. While displaying all those images in the browser it is taking so much time to download all those and display. So I want to write a Java program to make a duplicate copies of those images, which are small in height and width and display those images in small size. Basically I need to display all the list of images as thumbnail view or list view with faster speed.
Thanks in advance..
Upendra P.

I read the documentation. There is no corresponding Image class. The other
classes are like BufferedImage and all.Yes BufferedImage sounds like what you want.
You could (1) Read the image (2) Obtain its dimensions and create a blank
scaled image (3) Draw a scaled version of the original image using the
Graphics2D obtained from the smaller one. (4) Save the smaller image.
The javax.util.ImageIO class will help with reading and writing the data and
Sun's Tutorial has a section on "2D Graphics".

Similar Messages

  • How to decrease the size of an image (CS5)?

    I need help with how to reduce the size of an image to fit various smaller sizes.  E.g. 135 x 380mm, 254 x254mm etc mounted/matted. Therefore, the image must be made smaller than these sizes without losing quality and any part of the image. I am unable to crop to achieve these sizes since I need the full image. These photos were taken by using a Canon D450 camera and in both RAW & JPEG.
    Your help is much appreciated.

    You may want to use Image > Image size... and dial in the sizes you want.
    Set your units to mm in the dialog. Turn off resample and you can adjust the final print size.
    What I am showing you is called "scaling", changing the print size without throwing out pixels as resample would do. Your image is  intact. This is from CS6, but it should be about the same in CS5.
    Gene

  • How to adjust the size of image to suit the size of panel?

    i have got a panel which contains a image.but i don't want to use scroll panel if the image's size is bigger than the panel.
    what can i do to change the size of image to suit the size of the panel every time i want to display it?
    thanks

    Reply 3 of this thread should be able to help you:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=286424

  • How to decrease the size of a table

    Hi ,
    I have dropped a table on UI ... By default this table wont have any data .What i want that i should be able to decrease the size of table.
    I want that we should be able to show only 4-5 rows and have a scroll bar if we have more records.

    you need 16 pixel for each row, 14 pixel for the non-wrapped table header, and 16 pixel for the horizontal scroll bar, if it is displayed.
    so for your case you need to display 5 rows
    set the <b>inlineStyle</b> for your table from the property inspector to
    inlineStyle="height:110px;"
    <b>Thank to Frank Nimphius for his book</b>

  • How to decrease the size of the JS and CSS File

    Hi experts,
    I m facing a bandwidth problem because i m accessing an application from a PDA and i noticed that it takes a very long time to load a very simple page. After some investigation, i noticed that its because the JS and CSS files downloaded are rather big.
    sapUrMapi_ie6.js (Size: 301 KB)
    sapWdSsr_ie6.js (Size: 79 KB)
    ur_ie6.css (Size: 247KB).
    Any idea how to minimize the size of these files or any workaround as to this problem ?
    Your help will be much appreciated.
    Regards,
    Daniel

    Hi,
    Check this link this may be helpful to you
    http://help.sap.com/saphelp_nw04/helpdata/en/b5/7e1141e109ef6fe10000000a1550b0/frameset.htm
    Regards,
    SURYA

  • How to access the SAP MDM destinations using mdm java api in 7.1

    hi,
    I have SAP MDM 7.1 SP11 and SAP Portal 7.3 and developing the custom webdynpro application using the  JAVA MDM API. I want configure the SAP MDM destinations in SAP Portal .
    How to access the MDM destinations in java code using API? and how to create the connection with MDM using the MDM destinations.
    Please provide the code for access the SAP MDM destinations in java code using MDM java api and creating the connection to MDM.
    Thanks

    Jun,
    Thanks for the reply and api information.
    I have got this api information from the following sap documentation. But i am looking for the code by implementing this class and creating the mdm connection.
    Creating an MDM Connection Using Java Code - SAP NetWeaver Master Data Management (MDM) - SAP Library
    if any thing can you share it.
    Thanks

  • How to decrease the size of an Image in iAD

    Hello, there!
    I am trying to producer a new slide where I can write text in iAD.
    I have problems with it though and can you please tell me how to add new slides, where I can either write text or add new objects or assets?
    Also when I try to use the CAROUSEL, I can only put it there, but once I put the asset image on it, it doesnt work - I can't place the image in the center of each boxe and it doesn't go full screen once I click on on it through my iPod Touch (5th Generation).
    Please answer me those questions and I would be very happy indeed

    You may want to use Image > Image size... and dial in the sizes you want.
    Set your units to mm in the dialog. Turn off resample and you can adjust the final print size.
    What I am showing you is called "scaling", changing the print size without throwing out pixels as resample would do. Your image is  intact. This is from CS6, but it should be about the same in CS5.
    Gene

  • How to decrease the size of H263 video

    I want to generate a captured video to H263 format.
    Now I am sucessful to generate it to the format.But the size of the generated file seems a bit large.
    I think I can solve this problem by the means changing the parameters' value that is passed to the H263Format constructor.
    But I don't know how to adjust these values because I don't know much about H263's parameters
    Can someone do me the favor to tell me how to adjust the parameters below to decrease the video's size.
    Thx in advance
    H263Format
    public H263Format(java.awt.Dimension size,
                      int maxDataLength,
                      java.lang.Class dataType,
                      float frameRate,
                      int advancedPrediction,
                      int arithmeticCoding,
                      int errorCompensation,
                      int hrDB,
                      int pbFrames,
                      int unrestrictedVector)
        Constructs an H263Format object with the specified attributes.
        Parameters:
            size - A Dimension that specifies the frame size.
            maxDataLength - The maximum size of the compressed data array.
            dataType - The class type of the data.
            frameRate - The frame rate of the video.
            advancedPrediction - Specifies whether or not the H.263 advanced prediction capability (H.263 Annex F) is used.
            arithmeticCoding - Specifies whether or not the H.263 arithmetic coding capability (H.263 Annex E) is used.
            errorCompensation - Specifies whether or not the H.263 error compensation capability is used.
            hrDB - Specifies the H.263 Hypothetical Reference decoder buffer.
            pbFrames - Specifies whether or not the H.263 PB Frames capability (H.263 Annex G) is used.
            unrestrictedVector - Specifies whether or not the H.263 unrestricted motion vector capability (H.263 Annex D) is used.

    Usually you would have the video in other format diferent from h263, so you have to encode it with a processor. You must configure a processor and set the format from the video track to h263. Dont use the larger constructor, use simply:
    videotrackcontrol.setFormat(new VideoFormat(VideoFormat.H263));
    Then realize and start the processor. Take care with the syncronize.
    But you will need that the datasource of the processor has your preferred size before create it. And notice not all sizes are compatible with h263.

  • How to extract the number from image using java

    Hello every one
    i want to develope a project which can extract the number from image
    that i can use as inter or String or char.
    Is there any API in java which provide this type of facility.
    right now i m using java 5
    thanks in Advance
    Jignesh

    In my project i have a image in that i have a
    co-ordinate (x,y) I am still puzzled as to what you seek. It sounds to me like you have a point (x, y) represented by p. in java it's just p.getX() p.getY()
    i want to convert that cordinate to numeric form,
    i mena i want to use that cordinate in somewhere else
    in project.point.getX() point.getY()
    So need to convert it into numeric form u can called
    it OCR also.OCR is optical character recognition. If I want out and took a picture of the US Declaration of Independence and then wanted the words on the parchement in the picture in text form, then I would run the picture through a software program and it would try to optically recognise what lettering and number were present in the picture. In the end, I would have a text of what is written on the US Declaration of Independence.
    Is that what you want?

  • How to decrease the size of a 52 page document?

    InDesign Help:  Original 52 page document (5.5" x 8.5"- .25" margin) needs to be be reduced to 5.375"x .375" with a .375" margin.  Is there an easy way to fix this?  I created alternate page layout with the new dimensions, but margins are off.  I don't want to manually adjust each page.  Help!

    If your page elements were aligned to page guides or ruler or column guides, you can use the Layout Adjustment feature: Layout > Liquid Layout, then choose Layout Adjustment from the panel menu. Read about its options in InDesign Help.

  • How to set the size of an Excel-file,Java created in tabbed forma

    Hi all,
    I'm creating an Excel-file by writing data to an outputStream in tabbed format.
    My problem is : How can I set the width of the columns of that Excel-file, not the default-size?
    If anyone can help, that would be very nice.
    Thanks a lot,
    Regards,
    Tim

    You can write a generic xls file containing a Macro to open and set the column widths of text or csv files. Your java program can then call this generic file to open your text files.

  • How to store the certificate file by using import java.security package?

    Hi,
    I have a certificate file whose extension is .p12(So, it conforms to pkcs 12 standart).
    I wanna store this file which is in my file system in my pc. and I wann to store this file to smart card?
    // this two row just load the specified file
    KeyStore keyStore = KeyStore.getInstance("PKCS12");
    keyStore.load(new java.io.FileInputStream(pkcs12File), keyPassword);
    // I need to store keyStore object to smart card. but I do not know how to? Any idea????

    This is not adding external p12 f�le inside the smart card ? Am I right? I want a p12 f�le to add this this file to smart card indside

  • I'm using iphone 5 but its camera is not properly working. all the images i'm clicking are of dimension 600X800 and the size of the image is just 60-70 kb. now please tell me how to increase the dimension of images and its size.

    i'm using iphone 5 but its camera is not properly working. all the images i'm clicking are of dimension 600X800 and the size of the image is just 60-70 kb. now please tell me how to increase the dimension of images and its size.

    ''rojere [[#question-1055991|said]]''
    <blockquote>
    i try to keep my thumb palms off the mouse pad when i am typing but every now and then my screen resizes larger or smaller until i take my left palm off the keyboard base its only when my left palm is resting on the base next to the touch pad. i type pretty fast so it gets annoying and yes it also jumps screens or reverts back to previous message and i have to choose ctrl z to undo and get back to my message i was typing... it also switches tabs on me as well... not sure why my palm being on the left of the keypad on the base should effect anything but it does after a while. and i have to stop what i am doing...and go to the firefox menu and change the screen size back down to 100% sometimes it goes up to 200-300 other times it goes down to 70-80% i find it annoying i i wish there was a way to turn off the screen resize in the setup panel. if its just left to be 100% i am happy with that... i don't need it to be bigger or smaller... there should be a way to LOCK it down... i understand that there are people out there with eye problems and needs to have the screen size increase using the + or - but there should be a lock so it just stays no matter what is happening on my keypad or touch pad or base of the pad... that screen size will not increase or decrease. unless i turn off the lock... perhaps this is something they can implement in the next version or do a quick update of the browser
    </blockquote>
    sorry that is all greek to me thanks for attempting to explain what you were trying to explain sorry i just not tech person to be able to understand or where to begin ... have good day and thanks for again trying

  • I am trying to decrease the size of my aperature library on my MB Pro HD.  I used  file\ relocate master to move files to my External HD(EHD) and this worked.  However, the size of my MBP library has not decreased.

    I am trying to decrease the size of my aperature library on my MB Pro HD.  I used  file\ relocate master to move files to my External HD(EHD) and this worked.  However, the size of my MBP library has not decreased.  I do not want to delete the files on my MB Pro until I am confident Aperature can see the files on the EHD.  It looks like the relocate master fxn just copies the masters and data to another location. 

    Relocate master (or original in newer versions) does move and not copy the master file. Jut to make sure I just ram a test and moved some images out of the library to an external drive and they were definitely gone from the Aperture library.
    If you look at the images in the library that you moved do they have the referenced file badge? If you run a filter on your library looking for referenced files do the images you relocated show up? If you select one of the images and do a Show in Finder what does it show? Finally if you select the images and do Locate Referenced files do they appear listed as being on the volume you put them on?
    You could go into the library and look for the masters you moved to see if they are still there but if all the above show you they were relocated then I don;t think you will find them.
    How are you checking the library size? Have you quit Aperture and restarted it (better would be to log out and log back in) and then checked the size? It is possible that some of that data is cached and won't get updated till you restart.
    Finally you could do a library repair in case something got 'stuck'.

  • How to control the size of SVG images in epub files?

    There is unfortunately no support for SVG files in InDesign.
    Most of my images in jpg convertes nicely, but the small ones do not.
    Therefore I want to use SVG files which I have created in Illustrator.
    But how do I set the size in the epub file? Right now, whatever I do, they come out too big and I don't know how to control the size.
    Is there a program, like Sigil or other, that can place the image for me - I'm no html wizard you see....

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

Maybe you are looking for

  • Refreshing JEditorPane (Urgent) plz help

    hello programmers, i'm building an html editor: My html editor has a split pane, the 2 pane got of the split pane are JEditorPanes, one on which i write tag and the other i display them,... thankfully all's working great, my syntax is highlighting an

  • HTTP/1.1 302 Moved Temporarily

    I have a situation where weblogic is returning a HTTP/1.1 302 Moved Temporarily and was curious what the reason might be. WLS 6.1 win 2000 I.E. browser There are two cases illustrated here. The first has no proxy settings in the browser while the sec

  • Configuring iPod to play many podcasts in sequence

    Hi, How can I configure my iPod to play many short podcasts in sequence, without needing to click one by one as each one ends? Thanks in advance... Marcelo Segnori (Brasil)

  • Oracle ADF :Copy eo

    hello! all! i want to ask sth about Copy EO.. i have master-detail relationship.. i want to copy all table before commit transaction. but i can copy master table,can not copy detail table i think the problem is i can't get detail table in master tabl

  • Seahorse won't accept a blank password

    I want to set up automatic login, so I'm trying to blank the password on my login keyring. When I go through the change password flow in seahorse, though, it refuses to accept the blank password. I get a dialog with a grayed-out continue button, and