Image Scale

I want to be able to display an image on an Applet and take a value from the user for its scale and draw it depending on the value.. my question is.. how do i make the image display with lets say 50% scale (so on half the window) if the user entered 50 for the scale value
I hope my question makes sense
Thank you kindly in advance
Ivo

There's a method Image::getScaledInstance() that allows you to specify a new width and height for an image.
http://java.sun.com/j2se/1.4/docs/api/java/awt/Image.html#getScaledInstance(int,%20int,%20int)

Similar Messages

  • Linked image scale percentage

    Why is the linked image scale percentage being rounded off in Illustrator CC?

    Looks like a bug in AICC. You may please log it here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform so that Adobe Engineers can take a look at it.

  • IWeb: changing the slideshow image scale and viewing time

    I moved my iWeb sites over to another server (iPage) and went through the sites to observe for inconsistencies and problems.  While doing this, I noted that my image galleries, when placed into the slides show mode, were very small on my iPad 2 and that they cycled through at a very high speed.  I thought this was odd and I wondered if anyone else has observed the same thing?  It sounds to me that an HTML under-the-hood modification may be required or a bug fix to the iWeb code is in order, to change the sideshow image scale and viewing time/slide value.  Comments?  [I suspect that Apple does not hold iWeb bug fixes at or near to the top of its software development to-does priority list.  Sounds like I need to change web authoring software.]

    Why do you think it's a bug?
    Anyway :
    Is there any reason photos in an album page display small on the iPad, but normally on an iMac? And videos on a movies page don't play on the iPad, but are OK on the iMac?
    I use my own show :
    http://home.wyodor.net/photo/

  • What controls whether embedded images scale to email window size?

    When I create a new Mail.app msg and insert or drag/drop an image inline, it visually scales to fit the size of my msg window, which is about 60% of my screen width. (I'm not talking about altering the physical size of the image)
    However, when I look at the msg from the sent folder or from a copy sent to myself, it appears fullsize, and this causes the msg text to now have a line length equal to the width of the embedded image. So now I have to scroll sideways to read the msg/view the image, or open the note to the size of the image, which I don't want to do. I want the computer to adapt to me, not the other way around.
    I'm pretty sure that this used to function as I desire. To further rub it in, I got a msg from a relative today, sent from his peecee using DarkSideSoftware, and those images scale to my msg size. What's the deal?
    iMac G5 2GHz Mac OS X (10.4.8)

    hi, in prefs, Composing: Message Format: Rich Text
    The only contextual menu choices are Download Image and Copy Image. However, if I check an image that scales properly in the email I mentioned, the resulting menu includes:
    Open Attachment
    Open With
    Save Attachment
    Save to Downloads Folder
    View as Icon
    I also notice that 1 sec after hovering over the image in the "good" note, I get a popup for a few seconds indicating the image name, status, mime-type but hovering over the image in the other note produces no result.
    I thought it might have something to do with send/recv via .mac (imap) VS the "good" note came via another of my pop accts, but testing shows the same results.
    For grins, I blew the dust off Entourage 2004 and let it go get about 200 mail msgs, and the "good" note acts exactly the same, that is the images all scale to window size. The last note I sent via Mail with a 1920x1200 img and downloaded into Entourage displays inline --> smaller <-- than the note window size... It appears Entourage in general wants to scale to 50% of whatever the window size is moved to.
    Ok, I took the "good" note which was scaling correctly and used Mail.app to fwd it to my .mac acct and when I download it with Mail.app the images no longer scale, but now show fullsize. Same note functions as before/correctly in Entourage.

  • TrayIcon image scale

    Is there a general way to scale the Image for a TrayIcon so it's the correct size for the SystemTray? I tried using the same 64x64 PNG I'm using for my app's JFrame icon, but only the top left 24x24 or so shows up as my TrayIcon. I'm using Sun's build 1.6.0_02-b05 on Kubuntu 7.10.

    To scale the image to the correct size, use TrayIcon.setImageAutoSize(true). To obtain the desired size for the image in order to decide which of a range of images to load, use TrayIcon.getSize() before adding the tray icon to the system tray, or use SystemTray.getTrayIconSize().
    {color:0000ff}http://java.sun.com/javase/6/docs/api/java/awt/TrayIcon.html#setImageAutoSize(boolean)
    http://java.sun.com/javase/6/docs/api/java/awt/TrayIcon.html#getSize()
    http://java.sun.com/javase/6/docs/api/java/awt/SystemTray.html#getTrayIconSize(){color}
    luck, db

  • Placed image scale anomaly

    A funny thing happened on my way to the theatre ...
    Some days ago I placed an image into an Illie file, linked, 100% scale.
    This morning I needed to edit the linked file in Photoshop. This involved cropping a bit off the bottom of it, thereby changing its dimensions.
    Just to check that everything was still o.k. at the Illie end (because I somehow suspected that it might not be), I opened the Illie file.
    Lo and behold, everything was not o.k. The placed image had scaled itself up by some few % becoming too wide.
    Rather than fiddle around with scaling, I placed the image again and it came in in the right size.
    I notice that exactly the same thing happens when I have Illie open while I am editing the image. The placed image hops visibly when Illie reads the new size.
    Can anyone tell me why this is and how does Illie recognise the size of placed images?
    Does she calculate the area or what is it that happens?
    Here's an example that I tried afterwards, not having kept the original measurements:
    Original image file 63.218 x 47.414 mm (placed in Illie at 100% scale)
    Cropped in PS to 63.218 x 44.027 mm
    Changes in Illie to 64.846 x 45.161 mm (scale 102.576%)
    I can't make sense of the figures. Is anyone out there better at maths than I am? (Sure there must be!)

    When you update a link, then image is scaled to fit the original bounding box size because of the default in the links palette >> placement options >> transforms
    Links palette >> placement options>> dimensions should help. What I do not like most of these options later have blank sapce around the image, and it is hard to use the transform palette or snapping to for example snap to the edge of a die or guide.
    I replace the image after the canvas size changes in photoshop, cause placement options though it has been around forever is not really that useful. Maybe  someone else out there agrees/disagrees or has a different way to deal with this updating of resized images in Illustrator

  • Image scale caching causing problems

    I have an app with a image that the user must be able to zoom and scroll.
    When the image is first loaded it is at full view. When the user zooms the memory usage sky rockets, and during this zooming the app is very laggy.
    Once the memory has added about 70Mb, the zooming runs without lag.
    If the user waits however, the memory usage goes back down, the scaling lags again, and the memory fills again.
    I have been able to get around this with making the height an odd number of pixels.
    This causes the memory to stay at the +70Mb and prevent lagging, but this may not be a permanent solution.
    Is there any way to prevent the GC from wiping the scale information? Or any way to manage how the cached scale data is stored?

    The image is large. The app is for iOS and Android devices.
    The images are 5464x3073 (should be 3072, but made it odd to prevent problem), they are simply scaled to fit the screen (usually about 0.2 scale).
    Till this point is fine, obvious pause when loading the image, but when the user zooms in, the memory gets an extra 70Mb(if you zoom all the way in) and stays for about 10-20 seconds. During this time zoom is smooth. When the memory goes back down the process of zooming causes lag and memory usage again.

  • Image scale to fit to file

    I am trying to save my image to file once I have scaled it.
    Trying the code attached but get an error. Can I save the file
    directly with <cfimage> or do I use <cffile>
    Thanks.

    Thanks for your help, my line does have "write" permissions
    set, is this the line you mean?
    <cfimage source="#thumbImage#" action="write"
    destination="#destination#">
    Attached is the full code,
    As I understand it the full image is loaded into the gallery
    folder, the server file is read and scaled with
    <cfset svrFile = "#File.ServerFile#" />
    <cfimage name="thumbImage"
    source="#ExpandPath("#application.galleryPath##galleryName#/#svrFile#")#"
    />
    <cfset ImageScaleToFit(thumbImage,200,"","bicubic")>
    The last bit is where the problem is where it it trying to
    write the file
    <cfset
    destination="#application.galleryPath##galleryName#/thumbs/#svrFile#">
    <cfimage source="#thumbImage#" action="write"
    destination="#destination#">
    Is it trying to use svrFile and scale and save it at the
    same time?

  • Why don't still images scale to fit the safe areas of the frame?

    Why doesn't Encore offer offer more flexibility for scaling images in slideshows. Yeah, I know it's very cool that it does a scale, but I want everybody who watches my dvd to be able to see ALL of my image. For those who own standard televisions, they won't be able to see the whole image unless I pan and zoom, and even then I have to time the pan correctly.
    Programmers, please add a feature so that users have more control over scaling.
    Thanks,
    Laz!

    Said this dozens of times, and will doubtless say it dozens of times more.
    There are 2 issues at play here.
    1 - Encore is an authoring app, not an editor, and as such it is down to you to prepare your assets correctly.
    2 - a standard TV will always crop the images - they overscan. the same image in a progressive scan system will display fully.
    So, what you need to do is decide what you need to create your images at, and if you use Photoshop, After Effects or Premiere, then you can use the title safe/Action safe overlays to scale things yourself.
    It has to be done this way, as not all TV sets overscan to the same degree - as I just said, Progressive Scan systems and LCD/Plasma screens don't overscan at all.
    This is what the safe areas are for.

  • CSS advice for Image scale mouseover/mouseout event

    Hi,
    I'm trying to add CSS to an image to create a mouseover/mouseout event. I just can't seem to get it to work.
    I wan't the the scale of the image to increase to 1.5 on mouseover, then return to 1 on mouseout.
    Any advice on the CSS coding would be greatly apreciated....
    Also how would I make an image hover whilst mouseove?.
    Thanks, Mike

    In mouseover event:
            var escalaX=1.5;
            var escalaY=1.5;
            image.getSymbolElement().css({
                "-webkit-transform":"scaleX(" + escalaX + ")",
                "-moz-transform":"scaleX(" + escalaX + ")",
                "-o-transform":"scaleX(" + escalaX + ")",
                "-ms-transform":"scaleX(" + escalaX + ")"
            image.getSymbolElement().css({
                "-webkit-transform":"scaleY(" + escalaY + ")",
                "-moz-transform":"scaleY(" + escalaY + ")",
                "-o-transform":"scaleY(" + escalaY + ")",
                "-ms-transform":"scaleY(" + escalaY + ")"
    if your image is not a symbol, then you must to use sym.$("image").css(... syntax.
    If you prefer animation and not instantaneous change, you can to see this thread: http://forums.adobe.com/message/5590639

  • Problems with Image scale

    hi,
    I have an Image instance that I want to manipulate by increasing and decreasing its visible size
    I've used many algorithms
    but most of it throws an out of memory error when enlarging for a couple of times.
    such as getScaledInstance(),or so;
    another thing,
    does any one know how to get a BufferedImage reference out of Image reference without casting?
    I hope any one can help.
    thanks in advance

    Maybe the code underneath helps to solve your bufferedImage/Image problem. scaledImage is the Image in that case. your other problem, in fact is, that u are running out of memory, because the Image repaints itself on and on again wihout being cleared out of the memory. in that case i would have to know about what u woild like to do with the program, so that maybe i can be of help for u. hope that helps...
    if (image != null)
    //Create BufferedImage as base
    BufferedImage sub = new BufferedImage
    Width,Height,BufferedImage.TYPE_INT_RGB);
    //Initialize painting area
    Graphics2D g = sub.createGraphics();
    //Paint scaledImage onto painting area
    g.drawImage(scaledImage, (int) -Sx, (int) -Sy, null);
    g.dispose();
    }

  • Placing Images - Scale to Fill, to Fit, etc.

    When I place an image in a Muse composition and use the program's scaling functions, what happens to the image quality? For example, if I'm building a slide show and I have Photoshop images that are 1500 pixels wide @ 72 dpi, but my slide show is only 800 pixels wide, does Muse automatically dump the extra image "weight" (in kb) when I export the site in preparation for FTP upload? Or, is the best practice in preparing my Photoshop images to aim for 100% of the actual size they will be used in Muse? In Dreamweaver this is an easy answer. But I dunno how Muse handles files in this situation. (As a new Muse user, you will likely see more annoying questions like this from me, thank you for your patience!) Kind regards-

    With Image quality, Zak has explained the similar situation on these threads :
    http://forums.adobe.com/message/6048743#6048743
    http://forums.adobe.com/message/5461004#5461004
    Thanks,
    Sanjit

  • Multiple Scale Images in one workflow?

    I want to take a large image, scale it down and rename it, then scale the new smaller image and rename it. (The Create Thumbnail function makes them too small, though.)
    Right now, my workflow looks like this:
    Get Selected Finder Items
    Copy Finder Items
    Scale Images
    Rename Finder Items
    Copy Finder Items
    Scale Images
    Rename Finder Items
    The workflow does the first scale and rename, and while it says it does the second half, nothing results from those commands. The log shows no errors. Playing with it, it seems that the second Copy Finder Items isn't working. The only workaround is for that second Copy Items to be pointed to a different folder than where the first items are put (which is annoying).
    I've tried throwing in commands for Automator to create a new folder and move things around, but repeatedly specifying where to move and copy almost defeats the purpose.
    Any idea how to get a single workflow to take one image, then scale and rename it twice to end up with TWO images of different sizes and names? TIA

    Have you tried the Move finder items action, if you say the workaround is to save it in a different folder?
    Just guessing:
    Get Selected Finder Items
    Copy Finder Items
    Scale Images
    Rename Finder Items (this is size 1)
    Copy Finder Items (to a prespecified temp folder)
    Scale Images
    Rename Finder Items
    Move Finder Items (back to where you want it to be, this is size 2)
    See if it works

  • Why no SCALE option for lightbox images?

    Need SCALE options for lightbox images!
    Must have SCALE DOWN option.
    Images must scale down to display correctly on a smaller screen.
    Currently Muse Lightbox FAILS on smaller browser screens.
    Adobe please include this feature ASAP!

    Thanks for the reply
    The problem with the Fullscreen Lightbox is that the images scale up and pixelate on a larger browser viewport.
    (To avoid this requires a very large image that makes loading slow)
    So for Fullscreen Lightbox I would like a SCALE DOWN ONLY option (requested previously). Then the images would not scale up above 100% and would float centred on larger browser viewports (FIT PROPORTIONALLY option used).
    And for the standard lightbox a scale option, as requested above, would mean the image doesn't overflow on a smaller browser viewport.
    The reason for asking for scale options is to keep images looking their best at 100%, and downscaling for smaller browser ports.

  • Images don't scale correctly

    I'm creating a responsive design. I have a background image, a logo at the top center, and some square images on the left side. I set all of the images to scale responsively. The logo and background images scale properly (both H and W), but the images on the left only scale W. The height remains the same. How do I get it so they all scale both H and W?
    Thanks

    Hi BruceMCE
    Can you share the project files with us? Would like to check on what are the settings you have done.
    Regards
    Vinod Menon
    Edge Animate Team

Maybe you are looking for

  • Issue related to change of Quotas on transfering an employee

    Dear All, I have a query regarding the generation/ updation of quotas during transfers. We have 2 sets of groupings. For the 1st set of grouping as per the PSA's, PL quota is 21 days and for the 2nd set of grouping, PL quota is 24 days and is geneart

  • My ipod nano is frozen, but my hold switch is broken so I can't reset it.

    I have an 8gb ipod nano. When I plugged it into my computer to sync it it said I had to restore it.  I clicked restore, but it said the ipod couldn't be found and then my ipod froze. I can't reset it because my hold switch no longer works and togglin

  • Page Setup And Orientation Seems Crazy to do Such Simple Task !

    i am evaluating crystal reports 2008 , i'm having created a custom paper size width = 8 inch and height = 6 inches using windows forms in printers and faxes . but crystal report changes my report to landscape ??? i want to print it in portrait. I hav

  • External Hard Drive Data Recovery

    Hello Apple Support Communities! I have a Western Digital 320GB external hard drive and it currently has 0 bytes available. This has prevented me from even viewing the hard drive on my finder window. I can only see it in disk utility. I have tried re

  • Dvd drive won't mount disks

    My dvd/cd super drive will not mount or burn dvd disks. Cds are able to mount and burn. This is a new issue that started after my Apple Care expired six months ago... Any suggestions? Thanks. G5   Mac OS X (10.4.9)   1.8 Ghz PowerPC G5 single process