Resizing Image

Hi,
I have added the image to metafile which is defined in image. then resize the image display depends on the screen resolution. I have problem in resolution.
My system configuration is,
windows 8.1
screen resolution 1920x1080 and screen set in larger size.
when the image is cropped and only displaying one of four size of the image. 

hi,
question is not clear.
please give more details !!!!

Similar Messages

  • Which approach to use for resizing image

    There are two ways of resizing images as I know:
    1. image.getScaledInstance(width,height,hint);
    Using hint like Image.SCALE_AREA_AVERAGING gives somehwat satisfactory resizing.
    2. static BufferedImage resize(GraphicsConfiguration gc, BufferedImage source, int w, int h, Object hintValue) {
    BufferedImage result = gc.createCompatibleImage(w, h, source.getTransparency());
    Graphics2D g2 = result.createGraphics();
    g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hintValue);
    double sx = (double) w / source.getWidth(), sy = (double) h / source.getHeight();
    g2.drawRenderedImage(source, AffineTransform.getScaleInstance(sx, sy));
    g2.dispose();
    return result;
    where the hint passed is RenderingHints.VALUE_INTERPOLATION_BILINEAR ;
    Now which of the two method method should I use-using image.getScaledInstance() or using AffineTranform ? opr is there any other way which is faster but provides good result?
    i am creating an image editor, so the GUI dialog will have oprtion to choose the algorithm. I want the method which provides better result yet faster.
    Tanveer

    http://forum.java.sun.com/thread.jsp?forum=20&thread=522483

  • Need help on quality of resized image!!

    I am required to resize images to max 1240pixel (longest dimension) as a submission of work, though when work is viewed it will be at 30"x40".  Can not figure out a way to do this where images don't become quite pixelated when viewed at larger size.   Appreciate any suggestions. 

    Is there some software to verify if my graphics card is shotty?
    Techtool Pro has some testing, the AHT tests VRAM, but game benchmarks and stressing will tell you the most.
    Is re-seating the graphics card or memory worth trying?
    Absolutely. Just don't reinstall the graphics card until you clean it thoroughly.
    Cleaning the dust out of my machine?
    YES. A dust filled graphics card heatsink will cause the GPU to cook, and cause problems thet you describe.
    If I need a new graphics card, what are my options? Do I have to purchase it via Apple store? I would like to stick with an Nvidia card so am I stuck buying the same card I currently have or can I upgrade?
    You don't have to buy from Apple, but using with OS X limits your choices to Mac compatible or flashable PC versions.
    There is an awful lot of user input into this topic here:
    http://blog.macsales.com/602-testing-those-new-graphics-cards
    Card reviews can also help:
    http://www.anandtech.com/video/showdoc.aspx?i=3140&p=9
    http://www.tomshardware.com/reviews/radeon-hd-4870,1964.html

  • 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?

  • Upload and Resize Image not inserting filename in database

    I have a form that I created using the insert record form wizard. One of the fields is a file field and my form enctype is set to multipart/form-data. I then used the upload and resize image behavior and set the parameters. When testing the form the file uploads to the correct directory but no entry is made into the database for that particular field. The other fields are entered into the database just fine. If it helps, here is the code generated before the  tag:
    <br />
    <br /><?php require_once('../../Connections/test.php'); ?>
    <br /><?php<br />// Load the common classes<br />require_once('../../includes/common/KT_common.php');<br /><br />// Load the tNG classes<br />require_once('../../includes/tng/tNG.inc.php');<br /><br />// Make a transaction dispatcher instance<br />$tNGs = new tNG_dispatcher("../../");<br /><br />// Make unified connection variable<br />$conn_test = new KT_connection($test, $database_test);<br /><br />// Start trigger<br />$formValidation = new tNG_FormValidation();<br />$tNGs->prepareValidation($formValidation);<br />// End trigger<br /><br />//start Trigger_ImageUpload trigger<br />//remove this line if you want to edit the code by hand <br />function Trigger_ImageUpload(&$tNG) {<br />  $uploadObj = new tNG_ImageUpload($tNG);<br />  $uploadObj->setFormFieldName("picture");<br />  $uploadObj->setDbFieldName("picture");<br />  $uploadObj->setFolder("../images/");<br />  $uploadObj->setResize("true", 120, 0);<br />  $uploadObj->setMaxSize(1500);<br />  $uploadObj->setAllowedExtensions("gif, jpg, jpe, jpeg, png, bmp");<br />  $uploadObj->setRename("auto");<br />  return $uploadObj->Execute();<br />}<br />//end Trigger_ImageUpload trigger<br /><br />// Make an insert transaction instance<br />$ins_team = new tNG_insert($conn_test);<br />$tNGs->addTransaction($ins_team);<br />// Register triggers<br />$ins_team->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1");<br />$ins_team->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);<br />$ins_team->registerTrigger("END", "Trigger_Default_Redirect", 99, "../team.php");<br />$ins_team->registerTrigger("AFTER", "Trigger_ImageUpload", 97);<br />// Add columns<br />$ins_team->setTable("team");<br />$ins_team->addColumn("id", "NUMERIC_TYPE", "POST", "id");<br />$ins_team->addColumn("sort", "NUMERIC_TYPE", "POST", "sort");<br />$ins_team->addColumn("name", "STRING_TYPE", "POST", "name");<br />$ins_team->addColumn("title", "STRING_TYPE", "POST", "title");<br />$ins_team->addColumn("description", "STRING_TYPE", "POST", "description");<br />$ins_team->addColumn("picture", "FILE_TYPE", "FILES", "picture");<br />$ins_team->setPrimaryKey("id", "NUMERIC_TYPE");<br /><br />// Execute all the registered transactions<br />$tNGs->executeTransactions();<br /><br />// Get the transaction recordset<br />$rsteam = $tNGs->getRecordset("team");<br />$row_rsteam = mysql_fetch_assoc($rsteam);<br />$totalRows_rsteam = mysql_num_rows($rsteam);<br />?>

    If the reason is about memory, warning message should be happened when upload the image, because "show thumbnail" means resize at second time, how come you failed to resize the picture that system let it upload succeed at the first time by the same resize process?
    upload procedure
    a.jpg: 2722x1814, 1.2mb
    upload condition: fixed width 330px, 1.5mb
    "upload and resize" a.jpg -> file upload -> "resize engine" -> passed (but not work and no warning message)
    "show thumbnail" a.jpg -> "resize engine" -> failed (not enough memory)
    it doesn't make sense.
    and you miss an important key point, I upload the same picture myself, and resize work, so I said it happened at random, and that's why I am so worried.

  • Resize image in pdf file

    I need to resize image in pdf ,
    I get this [http://www.java2s.com/Tutorial/Java/0419__PDF/Positionandresizeanimage.htm]
    I try to put the code in my servlet
    but I get error on not static method on PdfContentByte cb = writer.getDirectContent(); how to deal this problem
    Thank You

    PdfContentByte cb = writer.getDirectContent();There is no such method in the JDK or the Servlet API.
    Ask whoever provides it.

  • Resizing images published through flickr, but I don't want it to.

    I set up a flickr connection with LR3, very cool. However it resized the image to 1024x768, though I have nothing set under 'resize'. Why is it doing that?  Do I have to set it to resize everything to 9000 pix and not enlarge for it to keep the original size?

    Setting the resolution to 9000 x 9000 wont make any difference. Or at least it did not for me.
    It could be a limitation of Flickr (no Pro account). Perhaps it is different with a Pro account.size file is being uploaded if you dont resize on output but you wont see it if you dont have a Pro account.
    In fact, from the Flickr site: Only smaller (resized) images accessible (though the originals are saved in case you upgrade later)
    This would suggest that your original size file is being uploaded if you dont resize on output but you wont see it if you dont have a Pro account.

  • Problem with getting resized image's bytes

    I've got a problem with getting correct bytes of a newly resized image. The flow is that I retrive an image from the filesystem. Due to the fact that it is large I resize it to a 50x50px thumbnail. I can display this thumbnail in #benchmark1 (see code below). Unfortunately something's wrong with my imageToBytes funtion which returns reasonably small size of image but is totally useless - I can't make an image of it anymore so at #benchmark2 the application either crashes or keeps freezing. I saved this byte array on my disk and tried to preview under Windows how does it look but I got a message "Preview unavailabe". I did some digging in the Internet and I supposed that it's because I don't use any jpg or png encoders to save the file. Actually I think that it's not the case, as the bytes returned from method imageToBytes look weird - I cannot even make a new image of them and display it without any saving in memory.
                                  byte[] bytes = FileHandler.readFile (
                                          FileHandler.PHOTOS_PATH, fileName);
                                  Image img2 = Image.createImage (bytes, 0, bytes.length);
                                  img2 = ImageHandler.getInstance ().resize (img2);
                                                    //#benchmark1
                                  bytes = ImageUtils.imageToBytes (img2);
                                  img2 = Image.createImage (bytes, 0, bytes.length);
                                                    //#benchmark2my imageToBytes function is as follows:
         public static byte[] imageToBytes (Image img)
              int[] imgRgbData = new int[img.getWidth () * img.getHeight ()];
              byte[] imageData = null;
              try
                   img.getRGB (imgRgbData, 0, img.getWidth (), 0, 0, img.getWidth (),
                           img.getHeight ());
              catch (Exception e)
              ByteArrayOutputStream baos = new ByteArrayOutputStream ();
              DataOutputStream dos = new DataOutputStream (baos);
              try
                   for (int i = 0; i < imgRgbData.length; i++)
                        dos.writeInt (imgRgbData);
                   imageData = baos.toByteArray ();
                   baos.close ();
                   dos.close ();
              catch (Exception e)
              return imageData;
    I've run totally out of any idea what's wrong, please help!
    Edited by: crawlie on Jul 17, 2010 6:21 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hey Crawlie,
    Please note that simply writing int values into ByteArrayOutputStream will not suffice. Please have a look at the following conversion from int pixel value into byte[4]:
    public static final byte[] intToByteArray(int value) {
            return new byte[] {
                    (byte)(value >>> 24),
                    (byte)(value >>> 16),
                    (byte)(value >>> 8),
                    (byte)value
    }Good Luck!
    Daniel

  • Resizing Image and Not Keep Aspect Ratio

    Is there a free program to resize images and not keep the original aspect ratio?
    I need to resize loads of images to 100x100 pixels and have tried Image well and IResize yet they do not seem to have an option to not keep the original aspect ratio.
    Thank you
    20" Intel 2GHz Core Duo imac, 2GB Ram, 250 GB HD    

    Hi, Downsize does not seem all that great according to reviews. Why not see if you can buy PS E' 3 mac -- maybe ebay/amazon (if I remember I only paid about $70 for PS E3) As PS E4 just came out I'm sure someone has PS E3 for sale. You will then have no problems completing your image resizing.
    2 other questions for you..are you using the Mac side of your intel or Windows?
    if your using the Windows side I can let you have PS 6 (PC) ..freegratus.

  • Resizing images

    I am using Photoshop CS (older version).
    I am having a problem with resizing images. Prior to sending this, everything was working okay and now nothing will resize. my file path was file menu > automate > batch > and then I would choose my source and destination for the resized images. In the end, all the newly resized images would stay the same size as before. Can someone please help me with this???

    Neil,
    Have you selected the "resizing" action in the Batch dialog?

  • Cannot resize image

    I opened up PSE 4.0 today and I resized an image and it said that it was resized (6x9 became 5x7, for example), but when I dragged it to my project, it was still the same size (not smaller)! Prior to today, it has always been the size that I wanted it to be. I have not changed anything in PSE so I am wondering if anyone knows how to fix this so I can resize images again.
    Thanks so much!

    Hey Erica,
    You can resize the image using the move tool even after placing it in the project.
    Cheers,
    Chhaya

  • Cannot Resize Images in Elements 8

    Hi,
    I recently had my laptop stolen and I had to reinstall in Elements 8 on my new computer. Since then, I have unable to resize images. I go to Image -> Resize -> Image Size and the pixel dimensions box is grayed out and I am unable to change the pixel dimensions. The document size function works fine and is not grayed out.
    It's very odd and frustrating. Perhaps a simple fix, but I am totally stumped.
    Thank you for any assistance you can give.

    In order to change the pixel dimensions you must first turn on the Resample Image checkbox, since shedding or adding pixels necessarily involves resampling. Try it with that turned on.

  • Iphoto resize images

    I am new to iphoto and need to constantly resize images for internet use. How do I change the resolution or pixels??????? or what ever Mac might call it.
    thank you SO much
    Eleanor

    Personally I have never liked iPhoto for doing anything with an image. GraphicConverter for the Mac is a VERY extensive graphics application that can do about anything you care to do to an image. It is not the same type of program as Photo Shop but you can check it out for a free trial.
    Back to iPhoto, you can go to Share in the menu and email the photo to yourself at one of 3 sizes. This changes the resolution. And yes, Macintosh uses words like pixel and resolution just the same as everyone else.

  • How to resize image with high quality

    I refer lot of examples in image resizing. But quality of resized image not good. pls can give me solution for that with code?

    I refer lot of examples in image resizing.Have you read [_this article_|http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html]?
    db

  • How to resize Image Jpeg ?

    I have a problem when I scale file image Jjpeg.
    My code :
    public void resize(Image img){
    BufferredImage bimg = toBufferedImage(img);
    AffineTransform tx = new AffineTransform();
    tx.scale(125,125);
    AffineTransformOp op = new AffineTransformOp (tx,AffineTransformOp.TYPE_BILINEAR)
    bimg = op.filter(bimg, null);
    public static BufferedImage toBufferedImage(Image image) {
    if (image instanceof BufferedImage) {
    return (BufferedImage)image;
    // Determine if the image has transparent pixels; for this method's
    // implementation, see e661 Determining If an Image Has Transparent Pixels
    boolean hasAlpha = hasAlpha(image);
    // Create a buffered image with a format that's compatible with the screen
    BufferedImage bimage = null;
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    try {
    // Determine the type of transparency of the new buffered image
    int transparency = Transparency.OPAQUE;
    if (hasAlpha) {
    transparency = Transparency.BITMASK;
    // Create the buffered image
    GraphicsDevice gs = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gs.getDefaultConfiguration();
    bimage = gc.createCompatibleImage(
    image.getWidth(null), image.getHeight(null), transparency);
    } catch (HeadlessException e) {
    // The system does not have a screen
    if (bimage == null) {
    // Create a buffered image using the default color model
    int type = BufferedImage.TYPE_INT_RGB;
    if (hasAlpha) {
    type = BufferedImage.TYPE_INT_ARGB;
    bimage = new BufferedImage(image.getWidth(null), image.getHeight(null), type);
    // Copy image to buffered image
    Graphics g = bimage.createGraphics();
    // Paint the image onto the buffered image
    g.drawImage(image, 0, 0, null);
    g.dispose();
    return bimage;
    }

    This is my code :
    private ImageIcon getImageIcon(String path){
    ImageIcon iIcon = new ImageIcon(path);
    if(iIcon.getIconHeight() > 125 || iIcon.getIconWidth() > 125){
    Image img = iIcon.getImage();
    int iw = img.getHeight(null);
    int ih = img.getWidth(null);
    BufferedImage bImage1 = toBufferedImage(img);
    BufferedImage bImage2 = new BufferedImage(400,400,1);
    AffineTransform tx = new AffineTransform();
    tx.scale(400,400);
    AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
    BufferedImage bImage3 = op.filter(bImage1, bImage2);
    img = Toolkit.getDefaultToolkit().createImage(bImage2.getSource());
    return (new ImageIcon(img));
    if(iIcon == null)
    return null;
    return iIcon;
    public static BufferedImage toBufferedImage(Image image) {
    if (image instanceof BufferedImage) {
    return (BufferedImage)image;
    // Determine if the image has transparent pixels; for this method's
    // implementation, see e661 Determining If an Image Has Transparent Pixels
    boolean hasAlpha = hasAlpha(image);
    // Create a buffered image with a format that's compatible with the screen
    BufferedImage bimage = null;
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    try {
    // Determine the type of transparency of the new buffered image
    int transparency = Transparency.OPAQUE;
    if (hasAlpha) {
    transparency = Transparency.BITMASK;
    // Create the buffered image
    GraphicsDevice gs = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gs.getDefaultConfiguration();
    bimage = gc.createCompatibleImage(
    image.getWidth(null), image.getHeight(null), transparency);
    } catch (HeadlessException e) {
    // The system does not have a screen
    if (bimage == null) {
    // Create a buffered image using the default color model
    int type = BufferedImage.TYPE_INT_RGB;
    if (hasAlpha) {
    type = BufferedImage.TYPE_INT_ARGB;
    bimage = new BufferedImage(image.getWidth(null), image.getHeight(null), type);
    // Copy image to buffered image
    Graphics g = bimage.createGraphics();
    // Paint the image onto the buffered image
    g.drawImage(image, 0, 0, null);
    g.dispose();
    return bimage;
    When I recieve Img3 which is not same original Image (img1)
    Please help me ?

  • How to resize image using java imageio

    Hello ,
    I want to know how to resize image using java imageio.
    I dont want to use java awt because i am writing a web application.
    help is very much needed
    thank you.

    Just use an AffineTransform !
    Its much easier

Maybe you are looking for

  • Default storage location setting

    Hi, how can i set the default storage location. I need to reflect it autometically while booking any order. Regards, Rajdeep

  • Running CS4 on iMac. Nikon D5100.  Won't recognize .nef files.  Help???

    Currently I have CS4, 11.0.2 with Camera Raw 5.7.0.213 installed.  I've tried to install camera raw version 6.4 - which is what their chart says I need for the D5100, but I get an error message: "Updates could not be applied.  This patch is not appli

  • PSE 9 Organizer Not Responding

    I just bought PSE 9.  I started tagging people in organizer and it seemed to be working fine. Now I can work for a few minutes and all the sudden the little blue Window oval appers and it says that PSE Organizer is not responding and it gives me the

  • I need to scan an input string for EOF (control Z) and then view the data that has come in since the last EOF.

    I'm talking to a Furness micromanometer.  It sends a string of three lines formatted as follows: Time                 xx:xx:xx xM Velocity             xxxxx ft/m Temperature    xxx.x degC I want to watch the input, and when I see the EOF character (c

  • How to get windows 7 disk for my hp laptop

    My laptop got a virus and Its gone now but it took every thing off my computer from the windows 7 and the hp stuff that came with it and my laptop never came with the windows 7 disk when I got it fom hp so I cant redew it and I really need that disk