Resizing part of image

Hi Guys ,
I'm building a web application ,One of my requirements is to resize a image ,I could find out some open source Javascript code ,It works .
The problem i have is that i need to resize a part of the image,Not the whole image ,So basically i need to select a area which i need to resize and drag it so that it will get resized .
I'm wondering if there is a way to do this in Java .
I work on java but i'm a total newbie to imaging in java ,Can i achive this in Java applets ,ie. i should be able to select a area and resize only that part of the image.
what technology do you think i should use to do this stuff.
Any help would be greatly appreciated .
Thanks in advance
Chetan

You could stretch parts of an image in a Java applet quite easily.
If you've worked with the Graphics object, you could use some of the overloaded methods of drawImage.
This one could work:
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Graphics.html#drawImage(java.awt.Image,%20int,%20int,%20int,%20int,%20java.awt.Color,%20java.awt.image.ImageObserver)
If you want the output to be displayed in an image outside the applet, that is quite a bit more difficult. Java and JavaScript don't have any practical way to pass image objects between each other. If you are really in need, there are ways, though.
Possible solution: You could have the applet send the resulting image or stretching task to the server and have your applet pass a URL to JavaScript so the script can generate the img dom object to link to the result.

Similar Messages

  • Resizing part of image and selecting a area

    Hi Guys ,
    I'm building a web application ,One of my requirements is to resize a image ,I could find out some open source Javascript code ,It works .
    The problem i have is that i need to resize a part of the image,Not the whole image ,So basically i need to select a area which i need to resize and drag it so that it will get resized .
    I'm wondering if there is a way to do this in Java .
    I work on java but i'm a total newbie to imaging in java ,Can i achive this in Java applets ,ie. i should be able to select a area and resize only that part of the image.
    what technology do you think i should use to do this stuff.
    Any help would be greatly appreciated .
    Thanks in advance
    Chetan

    Hi ,
    Thanks for your reply ,I haven't had a chance to work on these API'S before ,I'm still deciding what kind of API to use ,So my question would be ,Can i achieve this stuff using some of the JAVA API'S.
    Thanks in advance
    Chetan

  • Changing fill colour for partly transparent images

    Does anyone know how to change the fill colour used for partly transparent images? I have a bunch of PNGs that I made for use as clip art, which I imported into iPhoto (that way I can use the media browser with Pages and Keynote).
    Unfortunately, the images (which are black) are shown on top of a black rectangle both in iPhoto and the media browser. I've tried changing the background colour to both gray and black, but the 'fill' colour stays black.

    There's no way to change it if you want to keep the transparency for use in other applications or web pages.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • Mac Mail resizing (compressible?) images

    I have been using Mac Mail to send images for a few years now. I am fully aware of the Image Size Option in the bottom right hand corner of Mail when an image has been attached. I use this feature often. Recently, the Large and Medium settings are too small. It reduces my 4.1MB image down to 108 KB for Large and Medium, and 70K for Small. In doing  research on these forums I came across a discussion about "compressible" images. What does that mean, and what would be making them (suddenly) un- or non-compressible such that this Mail setting would not work properly?
    In testing, I tried to send an un-edited image. In this case Mail works as it should, resizing the attached image reasonably, with four size options. My edited images seem to cause the problem. I edit in Photoshop (CS3) and always have. I can't remember another time when this has not worked as it should. I am wondering if this is a problem created by a recent update.
    Is anyone else experiencing this issue?
    Any insight, or fix, would be greatly appreciated.

    And only when it says Actual Size will the file be right. If it's set on small, medium or large files size will be reduced and will be turned into jpegs, no matter what the original version was.
    So open up an email and attach a file and look at what it says. If it says anything but Actual size the file is already altered. So change it to actual size and save as draft, which you can then delete.
    Then next time you attach an image it should say Actual Size because it defaults to whatever was last used. If it still changes then the file is probably too big, most emails have size limits and it's different for every service, so you have to check not only your own but the receiver of the email because if it's past their limit they will never get it.

  • Batch resize different sized images

    Hello,
    I'm hoping someone can point me in the right direction.  In the past I've used the image processor script to batch resize similarly sized images, but now I have a few hundred images that are all different sizes.  I would like to batch resize all these images so each image's longest side is resized to a specific size, while maintaining the current proportions.
    I am using CS5.
    Thanks in advance for any help,
    Adam

    Yeah, that's what I'm looking for.
    For example, if I have 3 images - 1200x1400px, 2700x2500px, and 3300x3300px.  I want to be able to batch resize all images so that their longest side is 200px while maintaining their current proportions.
    So afterwards, I would end up with 3 images - 171x200px, 200x185px, and 200x200px.

  • How to resize a gif image

    hi
    i need to resize a gif image to my preferable height and width . i have copied some code from net , its working fine for small images . but when i resize large images the background becomes back .... so
    any body help me put in this....
    regards
    mano

    hi
    thanks for ur reply . can u plz tell me were to insert the code here
    Image image = Toolkit.getDefaultToolkit().getImage("C:\\image.gif");
    MediaTracker mediaTracker = new MediaTracker(new Container());
    mediaTracker.addImage(image, 0);
    mediaTracker.waitForID(0);
    // determine thumbnail size from WIDTH and HEIGHT
    int thumbWidth = Integer.parseInt("120");
    int thumbHeight = Integer.parseInt("75");
    double thumbRatio = (double)thumbWidth / (double)thumbHeight;
    int imageWidth = image.getWidth(null);
    System.out.println("imageWidth "+ imageWidth);
    int imageHeight = image.getHeight(null);
    double imageRatio = (double)imageWidth / (double)imageHeight;
    if (thumbRatio < imageRatio) {
    thumbHeight = (int)(thumbWidth / imageRatio);
    } else {
    thumbWidth = (int)(thumbHeight * imageRatio);
    // draw original image to thumbnail image object and
    // scale it to the new size on-the-fly
    BufferedImage thumbImage = new BufferedImage(thumbWidth,
    thumbHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D graphics2D = thumbImage.createGraphics();
    graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
    RenderingHints.VALUE_INTERPOLATION_BILINEAR);
    graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);
    // save thumbnail image to OUTFILE
    BufferedOutputStream out = new BufferedOutputStream(new
    FileOutputStream(args[1]));
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
    JPEGEncodeParam param = encoder.
    getDefaultJPEGEncodeParam(thumbImage);
    int quality = Integer.parseInt("75");
    quality = Math.max(0, Math.min(quality, 100));
    param.setQuality((float)quality / 100.0f, false);
    encoder.setJPEGEncodeParam(param);
    encoder.encode(thumbImage);
    out.close();
    System.out.println("Done.");

  • How convert a big image to parts of images? means split a jpg image to several sub imges.(thi​s sub image can joint into that big image)

    hi friends..
    how convert a big image to parts of images? means split a jpg image to several sub imges.(this sub images can joint into that big image) any help
    Solved!
    Go to Solution.

    In the example, i have created two images and added them together, and the converse can be done in the same way.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Save Part of Image

    I have a question here. Now, I have a scanned picture and if I were to save the whole picture, it is a was of disk place. Can I save only part of the picture? If yes, can I know where can I get the guides or samples regarding this.
    Thank you.

    use CropImageFilter Crop the part of Image
    and then ... ...

  • Filter plugin and resize the output image

    I had write a filter plugin for photoshop.
    But i have a prolem.
    I dont know how i can resize the output image,
    i need clip just last 3 pixel of a only side of an image.
    I had read API but I'have not found what I looking.
    Thank you in advance

    I think it is impossible edit the size of the output image with a filter plugin.....but i'm not sure, so i prefer ask to you developer.
    I think is it possible with an other way.
    An other similar question: is possible put visible the padding pixel in the output image?

  • Resize an object (image) doesn't work?

    Hi
    I'm trying to resize an image, but nothing happens. I'm following the instructions in the Help page.
    Description:
    - Click the Select Object tool.
    - Selection handles appear when the pointer is over the image (so the image is not locked).
    - Click the image. A thicker selection border appears.
    - Drag a handle of the object.
    - The selection is changing size, but nothing happens with the image.
    Same thing with Shift-drag the handle (to retain the original aspect ratio), nothing happens with the image.
    What is wrong?
    Note:
    the image is also a link. Could it be that the selection that appears is for the link, and not for the image? If so, how can I select the image instead?
    I have tried to remove the image link (Select Object tool, right click the image, Properties, remove link), but the image could still not be resized.
    Software:
    Adobe Acrobat X Standard
    Windows 7 Pro

    I don't think there is an "object touchup tool".
    Adobes help for Adobe Acrobat X Standard says:
    Resize an object
    Click the object with the Select Object tool , or the tool used to create the object.
    Drag a handle of the object. Shift-drag the handle to retain the original aspect ratio.
    Link:
    http://help.adobe.com/en_US/acrobat/standard/using/WS58a04a822e3e50102bd615109794195ff-7c7 4.w.html
    But only the selection border is being resized, not the image.
    I'm beginning to believe there is a bug in the resizing function.

  • Resizing of composite image

    I have a splash panel which consists of one background image. On top of it I have placed company logo, version details. I want to resize this composite image when the panel gets resized.
    Can anyone suggest me a better way of doing this ?

    this methodWhat method ???
    Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and this wiki.

  • Copying a part of image from one file to another

    I am very new to InDesign, 2days old. I have to copy a small part of an image from one file and to paste on the other file. Is it possible? If yes, can you anybody explain me step by step?

    Welcome to the forum.
    Briefly, I would open the image in Photoshop. Crop the area you want. Size it to the finished size at (for printing) 300ppi, save it in the folder where you are going to save your InDesign document. Create a new InDesign document, choose Print for the intent, select the page size, margins, etc. save and name your document. You can place (command/control D) your image. Resizing it and positioning it to suit.
    By using a PSD file you can easily round trip back to Photoshop to make more changes.
    You should get some lessons, such as those on Lynda.com and Trainsimple.com and there are some excellent books available as well - Classroom in a Book and Visual Quickstart Guide.
    Derek

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Extract part of image & save with transparent background

    What is the best way to extract part of an image & save it with a transparent background?  I had hoped to the extracted images in 2 different ways.
    Firstly just to paste into another image.
    Secondly I'd like to try to open both the extracted item as well as the whole original photo in different video editing programs including Premiere Elements & sony Vegas.  What is the best  way to do this?

    Here's what you could do.
    First make sure you have both images open in editor
    1. Open the image and select the area using the magnetic lasso/quick selection tool.
    2.  Select Layer -> New -> Layer Via Copy
    3. Now in the layers palette, right click the layer and select 'Dulicate Layer'
    4. In the duplicate layer dialog, in document - select the other image, where you would like to paste the image to.
    5. You and ajust the poition of the pasted area/resize it using the move tool or transform tool (Ctrl + T).
    6. Save the image with a new name
    If you simply want to save the image with transparency (after step #2) - you may -
    > hide the previous layer and Save the image as a png/gif so transparency is presereved.
    Hope that helps.
    When you have teh saved documents you can open them up in different editors.
    Regards,

  • Resizing and placing images CS6 Photoshop

    Hi -
    I am having trouble, just recently, placing and resizing image layers. The option to "place" an image from the file menu is no longer available and instead there are two - "Place Embedded" and "Place Linked". However, the images are not resizable after you size them initially. After that you can only access the sizing through the drop down menu at the top of the screen. Before I had the ability to select the layer and the corner points to resize use to come up. Have there been changes at all to CS6?
    Also, I had my file window close down when trying to select new image files to place and has never done that before.
    Running a new 15" MacBook Pro. 
    Thanks,
    Bryan

    From what I saw of the video it was not showing the whole story the broken link part of the story was missing. How it works and what can be done if you can not resolve the broken link.
    Where some have a use for Place linked I prefer to have embedded objects. For I want collages that may use the same original images to be independent from each other. Fortunately while the old interface menu File>Place no longer exists. Old scriptlistener code for  menu File>Place still places in images in Photoshop CC 14.2 and they seem to be embedded smart objects for opening the smart object with a double click winds up opening files copied by Photoshop in the user ID local temp space. So my old collage populating scripts still work. So I do not need to add code toe test if the users is using Photoshop CC 14.2 or newer and have two place versions  menu File>Place and menu File Place Embedded....

Maybe you are looking for

  • No DVD Drive Found on my G4

    Hi, I recently purchased a used G4 with OS 10.1.5. In order to upgrade to Tiger I need a DVD Driver. When I do a find no driver is found, I also tried inserting a DVD, Nada. How easy/difficult is to find a DVD Driver? Are they available for download?

  • MWI does not work on Cisco IP Phones using VG248

    Hi, We are facing issue with MWI on/off using SMDI connectivity to FCS voicemail system with Cisco Callmanager (6.1.x). Below is the connectivity. CUCM ver 6.1.4---->VG248 ver 1.3.1 (SMDI and Asyc1) ----> FCS We are able to receive and send voicemail

  • Farmat number(UDF)

    Hi Friends,           I aneed to use userdefined function for format number .If i get charecter i should pass the charecte as it is and if i get the value in the source then i have to format the number.Could you please give me the UDF program for thi

  • Mapviewer.addImageTheme

    hi there, i'm trying to add an image to the mapviewer-bean and any time i'm receiving an internal server error message 500; -- cannot resolve addImageTheme in the java doc this method is described with the additional hint "for future purposes!". does

  • Images stop appearing in SRM Catalog

    Hi, We have a problem thet images in the SRM Catalog stop showing. The images are loaded in to the MDM Repository, (no hyperlinks) The end users can see some of the pictures but some are just blank (no red cross even) We are now using SAP MDM 7.1 SP0