Resizing image to fit  lower display resolution

Hi!
I'm pretty new in Java and have some problems regarding image sizing.
I have a picture (imageIcon) placed in a JLabel (placed on a panel among other JLabels). It fits fine in 1024 by 768 pixels but when I change the resolution to 800 by 600 it doesn't. I thought that the LayoutManager was supposed to take care of that? How can I make it all adjust to the current resolution? Oh, and I'm maximizing the frame using setExtendedState() but that doesn't have anything to do with it, or does it..? I use GridBagLayout by the way...

It depends how you want to control them - and what maths you want to use to do that.
For the code I posted above, instead of using:
Dimension ss = new Dimension(toolkit.getScreenSize());
int w = ss.width;
int h = ss.height;it would be generally better if you just used:
int w = getWidth();
int h = getHeight();This will make w equal the JFrame's width, instead of the screens.
I know that you are using a JFrame the size of the screen, however, this code will prevent bugs when the user resizes the window etc.
ps. dont forget to hand out them dukes.

Similar Messages

  • Does anyone resize images to fit InDesign Rectangle Frame tool?

    My question is based on some booklets that we have created in the past. We have some very large images all 300 ppi, but when shrunk down they tend to have an effective ppi of 500 or greater. Part of me feels that when the effective dpi is large, that I should go back into photoshop and resize those images, hopefully saving the size of the PDF file after exporting. So, my questions are one, does anyone even resize images anymore to fit the rectangle frame to keep ppi around 300 or two, do they not do this anymore and let InDesign handle this process when exporting to PDF?
    Thanks Everyone,
    Mike

    Better quality is to resize in Photoshop and sharpen there, because InDesign has no choice of the method of sharpening. But to be honest, in the majority o cases I do resampling in InDesign when exporting to PDF.

  • Safari option to resize image to fit window?

    This item has come up here before, but seems to always fizzle out. Did anyone ever find a plugin for Safari that would resize images so that they fit in the browser window?
    The problem is when you try to view pictures that are larger than the screen size, I would like to be able to have my Safari browser automatically resize them to fit the screen. MS Internet Explorer has this feature and I have gotten used to it!
    Randy.

    Geert01 wrote:
    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    This is a workaround. What's your real goal? Why do you want to do this?
    What browser(s)/version(s) are you using? All current browser versions have support for CSS3 background sizing which is the proper way to do this.

  • Resize image to fit any browser?

    How do I set my image to re-size to automatically fit any
    browser window?
    I know it's a simple thing like pinning the image to a layer
    that's size is set to % - am i right, please help!

    Nahh - it won't be reliable, from what I understand. And, not
    only will it
    fail unpredictably, but your image will be subjected to the
    horrible pixel
    doubling trick of browsers as it resizes....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "*mista*" <[email protected]> wrote in
    message
    news:eki2ic$6mr$[email protected]..
    >>>How do I set my image to re-size to automatically
    fit any browser window?
    > I am not too sure about this but if you define the
    container holding the
    > image
    > as width="100%" and then within the image tag define
    <img src=".."
    > width="100%" height="100%" >, that should stretch the
    container and the
    > image
    > to the size based on the browser window. I can't say
    much about how this
    > will
    > impact the resolution of the image.
    > And like Shane said, what would you want to achieve by
    this.
    > Maybe someone more experienced can give better
    suggestions
    >

  • Is There A Way To Resize Photos To Fit Desktop Display?

    Whenever I find cool pics to make into a desktop slideshow, they're either too big or too small. Centering or tile views never look right. I can crop photos in Preview, but it's both tedious and basically guesswork. Is there a standard size that fits?

    The size of the pic needed will depend on your screen size and your resolution. You can use an app such as GraphicConverter
    http://www.lemkesoft.com/
    to resize until you get the right size.

  • Cannot get an Apex HTML region with table with a background image to resize image to fit table

    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    Thanks in advance!
    Geert

    Geert01 wrote:
    I want to achieve this: Table whith background image but cannot get it to work in an Apex page with HTML region.
    Adding the following code to the html region:
    <table class="tableWithBackground" width="300px" height="200px" border="1">
        <tr>
            <td>
                <img class="tableBackground" src="#APP_IMAGES#Demo.jpg">
                Hello
            </td>
            <td>
                World
            </td>
        </tr>
        <tr>
            <td>How are<br><br><br><br><br>you?</td>
            <td>I am fine</td>
        </tr>
    </td>
    Results in a page with a table but without borders (at his stage I have not yet uploaded the Demo.jpg). After uploading the Demo.jpg results in a table with the entire image placed in het first cell. After placing the class code in the CSS inline property I expected to see the result as is shown in the Table whith background image  demo. For some reason this does not work (the image is no longer visible).
    Can anybody tell me how to achieve my goal?
    This is a workaround. What's your real goal? Why do you want to do this?
    What browser(s)/version(s) are you using? All current browser versions have support for CSS3 background sizing which is the proper way to do this.

  • Cropping/resizing image by pixel dimensions

    I am trying to crop or resize an image that is originally 2,122 x 1,415 px | 7.1 x 4.7 in | 300 dpi. I am to crop/resize image to fit 756 x 275 px. However, I don't want to lose the whole image. I would like to use the whole image just adjust it to the dimensions.
    How can I accomplish this without creating any distortion or by removing elements by cropping the image?

    Hello Slange,
    may I propose a solution based on a more mathematical derivation, where I assume the height of 275 px is decisive. The way is the same, if the 765 px width is important.
    The reduced copy of 2122 x 1415 provides 412 x 275. To the wished 756 you need: 756 - 412 = 344. Splitting it into two parts I'll get 344 : 2 = 172. These I mount now (The black borders are only for better overview.) to an image with the wished measures 756 x 275:
    The white area you can fill it with any suitable color.
    Hans-Günter

  • Preview doesn't display images to fit window

    I'm running OSX 10.6.8 on a 27" iMac, and when I enlarge the Preview window to fit the screen (by dragging the corner), the images don't enlarge. They seem to be stuck at about 1920 pixels wide (at a guess) instead of 2560 wide. I can zoom in, but I want the images to exactly fit the window. Preferences > Scale large images to fit window doesn't work, neither does View > Zoom to fit (which is grayed).
    Any suggestions as to how I make images fit the window?

    Hi, Guy Burns,
    What is the resolution of the images you try to enlarge?
    My guess:
    If the resolution of your images is lower then 2560 wide (your screen resolution), the window will open with the exact size and resolution of the picture (for instance 1920 wide). i.e. One pixel on your screen equals one pixel of your picture.You can indeed enlarge the window and zoom in, but then you are enlarging pixels, the image will get less sharp.
    The "Scale large images to fit window" function, is meant for "large images" as the name implies, so images with a larger resolution then your screen resolution. With this function, you can reduce the size of images that would otherwise not fit entirely on your screen, to the necessary size to view the whole picture as big as possible. So this function does not work if the "scale" is 100% or more.
    In slideshow mode however, there's a function to automatically adapt the size of smaller images to "full screen", and also "quicklook" (spacebar) supports full screen mode.

  • After OS X update moving 1:1 images results in low resolution and a long delay to snap into high res

    After the OS X 10.8.5 update on my current generation 27' iMac moving 1:1 images results in very low resolution for those areas I am moving to with as long as a two second delay before the image snaps back into full resolution. Not only that but when it snaps back into full resolution you see a shift in alignment and a snapping into place with the nearby area that was already in full resolution. This is awful and is occuring with Lightroom 5 and 5.2. Has anyone experienced this?
    My iMacs specs are the current generation 27" iMac, i7 3.4 Ghz, 32GB RAM, and the NVIDIA GeForce GTX 680MX 2GB running OS X 10.8.5.
    I did not have this issue with OS X 10.8.3.

    I have noticed something similar on my Win7x64 system, but am not able to reliably reproduce it. It seems, for me at least, to be a combination of +Clarity and Lens Profile Correction which will always trigger an observable screen redraw when moving from segment to segment in 1:1 view mode. The variable is the delay.....most often it's a fleeting effect, but occasionally there's a more obvious delay in redrawing the image display. I suspect the more obvious delay is, in addition to the +Clarity and Lens Correction, some internal resource utilisation over a longer Lightroom session....certainly every time I've encountered it a Lightroom restart has cleared it up.
    Don't know it that helps, or gives you any pointers to reducing the impact. Because of another "issue" with Lens Corrections (when it's applied, Spot Removal work gets slower), I tend to apply it last of all when editing pictures....so that also helps avoid this 1:1 screen redraw problem.

  • I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated.

    I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated. Heres an image of before and after. The first image I use is a JPG 72dpi 1500px x1500px and I want to downsize it to 600x600px same res, but it keeps pixelating, this has never happened before. Any suggestions, thoughts?
    thanks!

    I wouldn't say pixelated; more like blurry.
    Like ConnectedCreative said, what steps are you using? Are you using "bicubic sharper" when resizing down?

  • Downloads Low resolution images and not the high resolution as it did in 08

    'm using iPhoto '09 , unfortunately iPhoto only downloads the low res images and not the high resolution images. This makes it pretty much worthless, since the low resolution images are really bad in iPhoto. There was not any problems with Iphoto in the past Thank You

    What do you mean by "downloading"? There are a couple of ways to get image file out of iPhoto:
    1 - select the thumbnails and drag them to the desktop. This will give you copies of the latest version of each photo.
    2 - select the thumbnails, use the File->Export->File Export menu option. Depending on how you configure the export you will get the original, the latest version and/or a reduced size copy that you determine.
    3 - select thumbnails and use the Share->Send to DVD. This produces a mini library of the photos you've selected which include the original files, thumbnail files and any modified/edited file. This method is intended for use on computers that are running iPhoto.
    Which method are you using?

  • Hello, we are interested in more information on the Image Size Fit To option in phototshop.  For example, if we open a 46x25 inch 120 dpi image and choose Fit to 4x6" does all of the resolution remain?  Any links to tutorials in this area are appreciate

    Hello, we are interested in more information on the Image Size > Fit To option in phototshop.  For example, if we open a 46x25 inch 120 dpi image and choose Fit to 4x6" does all of the resolution remain?  Any links to tutorials in this area are appreciated.

    Let's look at the first thing: Aspect Ratio  46W x 25H does not fit 6W x 4H exactly. You get 6W x 3.621H If we preserve Landscape Orientation and Aspect Ratio. If I set H to 4, W will be 7.36 inches, clipping your picture.
    You'll have to decide on how to clip off that 1.36 inches so your picture can be 4 x 6 in order to solve that problem.
    Notice I set Resample off. Throwing out pixels is destructive editing. So what I am doing is "Scaling", changing the Print Size without touch the pixels. Notice how high the resolution goes up.
    To Resample or not will be your decision.  I hope I answered your questions properly. Let me know otherwise.
    Gene

  • Are there options to export or save an image at a lower resolution?

    Are there options to export or save an image at a lower resolution?

    No, not in the Photos app. You would need to purchase/download a phot editing app for that.

  • Resizing Multiple Images to a lower quality of image in photoshop CS3

    Hi there,
    I want to re size a lot of images to a lower quality. Is there a way of doing this process without having to open each individual file time after time. All the images are different sizes. I just want to lower the size of the file for putting in a pdf catalogue.
    I'm sure there is a way of doing this and I probably have been shown before but I have completely forgotten.
    I would appreciate any help or advice please. I'm using CS3.
    Thanks a million
    Ben

    Hi Ben,
    I usualy crate an Action. This is what you do:
    Place all your files into one directory, and create another directory inside that directory called for example. resized.
    1.) Open Photoshop. Create an Action. New Action
    2.) Than open one image from the directory
    3.) resize it.
    4.) Save it into resized
    5.) Close it
    6.) Switch Recording OFF for the Action.
    And than you just play it over and over again. Worked for me all the time.

  • CSS or HTML code to create resizable images to display in small view

    I am a book publisher and am publishing books to be read on Adobe Digital Editions. I'm looking for the CSS or HTML code to create resizable images that will display in "small view." Does anyone happen to know how to do this?

    hi,
    Our customers want to start reports by pushing a button instead of clicking on a link inside a dashboard.Create a dashboard page with all buttons referring to your dashboards....Is that fine???
    There u ll refer to your dashboard which has download,refresh all the options
    thanks,
    saichand.v

Maybe you are looking for