Viewing a portion of an image, scrollable

Hey,
I want to write a small application that can take an image and display a small portion of that image but allow 2 dimensional scrolling so that the entire image can be viewed.
What I really want to be able to do is view a large image on my phone screen, using the up, down, left and right buttons for navigation.
Would I be right in looking at the TiledImage class in JAI?
Has anyone got any examples?
Thanks

You can use Tiles usign JAI. But the source image must have Tile information(eg. Tiffs).
Another way is using ImageIO package like this.
Use the following to iteratively read the required rectangle of the image.
//reader is the legal reader of the Image.
ImageReadParam readParam = reader.getDefaultReadParam();
// x is X offset, y is Y offset
Rectangle rect = new Rectangle(x,y,width,height);
readParam.setSourceRegion(rect);
BufferedImage img = reader.read(0,readParam);Now for scrolling, use addAdjustmentListner method for JScrollPane like below.
viewerScroll is JScrollPane.
AdjustmentListener listener = new MyAdjustmentListener();
viewerScroll.getVerticalScrollBar().addAdjustmentListener(listener);Sample MyAdjustmentListener is,
class MyAdjustmentListener implements AdjustmentListener {
   public void adjustmentValueChanged(AdjustmentEvent evt) {
      Adjustable source = evt.getAdjustable();
      if(evt.getValueIsAdjusting())
     return;
      int orient = source.getOrientation();
      if(orient == Adjustable.VERTICAL){
       Point p = viewerScroll.getViewport().getViewPosition();
       Rectangle rect = new Rectangle(p.x,p.y,width,height);
       //Use this rectangle again to get the BufferedImage using the first code.
}varma

Similar Messages

  • With PPT 2007 when I print my PPT file to Notes view why does the slide portion become an image

    I am trying to print a ppt file using PowerPoint 2007 notes view to PDF with Distiller and create a full text searchable PDF.
    Everytime I do, the slide portion becomes an image. The only textual portion of the PDF are the page numbers and the actual notes.
    This was not the case with Office 2003. The slide portion was full text searchable. Does anyone know why this is.

    Irma,
    Show the file in Finder with the pps or ppt extension, you want Powerpoint to open.
    Get info on the file, using command-I, and change the application to open all documents like this to Powerpoint.

  • I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.  I've been unable to locate an app that will do this.

    I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.
    I've been unable to locate an app that will do this.  The Photos app that comes with the phone or iPad has extremely limited duration controls.  PhotoStream seems to load everything from my phone or iPad not allowing me to just load up a set group of images.
    iPhoto for iPad is getting some terrible recent reviews.  I tried a couple other free apps but they don't use Airplay.
    I can do something like this with iPhoto and my MB Air, but it's kind of ugly to have the computer open in order to connect by Airplay to my Apple TV.  I've thought the iPad or iPhone would be a lower profile controller.
    Am I out of luck?

    Thanks for your help.  Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV.  I guess I'm just stuck with using iPhoto on my MB Air.  Thanks again.
    paul

  • Is there a way to view different portions of a document at the same time?

    Is there a way to view different portions of a document at the same time?

    No. I suggest you leave feedback for the Pages team regarding this. You can find it under the Pages menu > Provide Pages Feedback. That takes you to the same page as this link.

  • In Lightroom 3 I am in Library mode in the Grid View and need to rearrange images, but it is not allowing me to move them.

    In Lightroom 3 I am in Library mode in the Grid View and need to rearrange images, but it is not allowing me to move them.

    I don't do a lot of dragging to custom arrange my images. But the custom order is right at the bottom of the list of sort orders on my computer.
    Added later: But don't worry about the custom order. It doesn't make any difference on my system. Are you sure you are dragging the image itself, and not the border around the image?

  • How to view the Nikon D4 RAW images in Bridge CS3

    I am in the process of buying the lattest Nikon camera the D4. However, I am still using CS3. I am wondering if I am still going to be able to view and process the RAW images in Bridge? Will I need a plug in? If so, where can I download?

    I am wondering if I am still going to be able to view and process the RAW images in Bridge?
    No, according to this overview:
    http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html
    the earliest support for Nikon D4 is ACR 6.7, the latest and last update of the Camera raw plug in that came with PSCS5
    Will I need a plug in? If so, where can I download?
    You can use the DNG route, meaning downloading the free DNG converter from Adobe and those DNG files will be viewable in CS3 and you can work with them.
    Windows: http://www.adobe.com/support/downloads/product.jsp?product=106&platform=Windows
    Mac: http://www.adobe.com/support/downloads/product.jsp?platform=Macintosh&product=106
    While it is none of my business I just wonder why you buy a 5K $ state of the art top dSLR from 2012 and still use an 'old' piece of software released in 2007 to try and get the most out of it.
    And sadly enough CS3 Bridge is known to be the worst version ever, you sure will benefit from at least CS5 but CS6 offers the new 2012 Process in ACR.

  • In putting together a book I can move photos onto a page and enlarge the picture but is there a way to reduce the picture size? some cases I want a smaller picture and if I change the size of the picture box I only get a portion of the image. I wnt to red

    picture size...in putting together a book I can move photos onto a page and enlarge the picture but is there a way to reduce the picture size? some cases I want a smaller picture and if I change the size of the picture box I only get a portion of the image. I want to reduce the image to fit the size of the box.

    If you right click on the image on the page in the context menu select photo box alignment and then select one of scale to fit {centered, Left-aligned, Right-aligned}
    That should do what you are loking for.

  • Acrobat 9 Standard - Selecting a portion of an image

    I have opened a pdf file and I am trying to select a portion of an image for copying it into a Word file.  I have clicked on the Select Tool, but, when I move the Select Tool on the image, it never changes to a cross and I cannot select the portion in which I am interested.  Could somebody help? 
    Many thanks

    Thanks for your reply.
    The problem actually is that the file is protected.

  • I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct with. but also keep the aspect ratio correct? how

    I have an image that I removed from its back ground and I would like to scale the bottom portion of the image because its to wide but not have that effect the top portion of the image which is the correct width. but also keep the aspect ratio correct, keep it looking as natural as possible (its a piece of jewlery) ? how can I begin to do this.

    The area circled in red is to wide (the width) the necklace's width is as wide as the models entire chest. And also the length of the necklace it's to long it should come down to the clevage area on the model/woman.

  • Render a portion of an image

    So I have this image of a weather map on my site. It is
    updated by a service every 5 minutes. I want to render it out in a
    small box and only show a portion of it. This will be clickable to
    take people to see the full size of the image. I can obviously do
    this by just squishing the image and telling DW to show it at a
    certain size, but is it possible to tell DW to show only a portion
    of the image file? I can not get the service to supply me with two
    images and I can not see to find any way to render just a portion
    of the image.
    All help is appreciated.

    On Wed, 2 Jul 2008 19:50:29 +0000 (UTC), "Kmoweb"
    <[email protected]> wrote:
    >what if I want it to render in a div? Will this work the
    same? I
    >don't want it to be the background of the whole page...
    You can make it the background of a <div> just as
    easily. However, if
    you want to make it clickable you'll have problems with that
    because
    you cannot interact with a background image. You might try
    something
    like this:
    <style type="text/css">
    #mapholder {
    position: relative;
    width: 100px;
    height: 100px;
    float:left;
    overflow:hidden;
    border:1px solid #000;
    #weathermap {
    position:absolute;
    top:-100px;
    left:-100px;
    </style>
    Then, to display the partial map:
    <div id="mapholder">
    <a href="/images/aircraft/66-16830.jpg"><img
    src="your/img.jpg" alt=""
    width="400" height="311" id="weathermap" /></a>
    </div>
    Gary

  • Selecting a portion of an image

    Hello
    I am having an image displayed in the front panel. Now i want to select a portion of the image such that when i select that particular portion in the front panel , the result is displayed. Is this possible?
    AT present what i have done is, i take a subset from the image 2D array. But here i always have to enter the index and length by trial and error to locate the exact position. Is there a possibility to automatically detect the index and length when i select that portion in the original image???
    Thankyou
    Nghtcwrlr
    ********************Kudos are alwayzz Welcome !! ******************

    Hello Mike
    Thankyou very much for you example. This was what i meant. I have modified ur VI to what i need. But still am having a difference. When i click a particular point in the original image, iam getting the result image at a distance away from where i click on original image. I tried to subtract the original pic size from both but still not wrkin. any idea?
    Thnx
    Message Edited by Nghtcrwlr on 02-12-2009 05:54 AM
    Nghtcwrlr
    ********************Kudos are alwayzz Welcome !! ******************
    Attachments:
    Test 1.vi ‏31 KB

  • Making a portion of an image bigger???

    how do i make a portion of an image bigger like eg.(a 3letters iamge logo "XYZ" and i want to make y&z bigger).Is the a tool which forms a marquee on the image so i can pull along and make it bigger???

    Hi Chain,
    If the letters are in a text layer of their own, you can simply hit the Text Tool, highlight the letters and then increase the font size in the tool bar.
    However the letters are embedded into the image then you are going to have to select them with one of the selection tools. The marquee could be a good starting point, simple drag a rectangle around them - but this will also capture anything that is in the background too. If it is important NOT to change the background and only change the letters, then you are going to have to trace around the edges with another selection tool, maybe the polygonal one would be good here?
    Either way, once you have made your selection, click on the Move Tool (M on your keyboard). You will see a bounding box with handles at the corners. You can now drag one of the handles to increase or decrease the contents within the bounding box. Hold down the Shift Key whilst you do this and you will also retain the proportions.
    When you hare happy, click on the tick box in the tool bar or hit enter. Press Ctrl+D to de-select the part of the image you have changed and you're all done.
    Hope this helps.
    Mark

  • Blurring a portion of an image

    Does anyone know how to blur a portion of an image in gradient-like fashion to give the impression of an unfocussed lens? Can you do it with a transparent layer mask?

    IMO, it's better to apply a Depth of Field mask on the Lens blur itself rather than on a layer that's already been lens blurred.
    With this Depth Map (in the lens blur dialog) the magnitude of the lens bokeh gradually changes, while with a layer mask gradient it simply gets fainter.
    Create a new channel, make the gradient mask on that, and call it up from the Depth Map in the lens blur interface.
    Rob

  • Is there anyway I can connect my iPhone 4 to my tv and view content like a mirror image?

    Is there anyway I can connect my iPhone 4 to my tv and view content like a mirror image?

    About AirPlay and Airplay Mirroring
    AirPlay Mirroring requires a second-generation Apple TV or later, and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). For non-qualifying Macs you can try using Air Parrot.
    Several Apple Articles Regarding AirPlay
    Apple TV (2nd and 3rd gen)- How to use AirPlay Mirroring
    How to set up and configure AirPort Express for AirPlay and iTunes
    About AirPlay Mirroring in OS X Mountain Lion
    iTunes 10- About playing music with AirPlay
    Troubleshooting AirPlay and AirPlay Mirroring
    Using AirPlay
    Thanks to the $15 Beamer, AirPlay streaming is still possible on Macs  that do not support Airplay and mirroring.
    Another solution is the Air Parrot.

  • Creating a magnified detail view of a portion of an image

    I have PSE11 and I am trying to create a magnified cutaway of an area of an image for a tutorial but I cannot find instructions for how to do this for PSE11 anywhere on the web.  I am also not very literate when it comes to the lingo so I would need some instructions in layman's language.  Can someone help me with this problem?

    I suggest try these two links:
    <http://www.elementsvillage.com/forums/showthread.php?t=44970>
    <http://graphicssoft.about.com/od/photoshop/ss/magnified.htm>
    The second link is for photoshop but you can adapt the technique to work
    in PSE11.
    Good luck.

Maybe you are looking for

  • ITunes opens when iPhone is connected even if "Auto sync" is disabled?

    I use my iMac (10.9.3) at home to Sync with my iPhone (7.1.1) to keep a full backup copy. I have the setting "Automatically Sync when this iPhone is connected" active, and up to recently this worked nicely. However, I think since the update to iTunes

  • Late 2008 macbook apple logo flickers Lion.

    I have a late 2008 macbook and every time I close the lid the screen periodically flickers. while it is supposed to be in sleep mode. I would like help for this as soon as I can get it please

  • Change of Cash Discount GL number

    Hi, Right now discount taken by customers for 2 sales office is going to 12345 gl account. Now I need to change the discount Gl account number for these 2 sales office to 54321. Can anyone let me know where do i need to make the change thanks

  • Copy window bigger than screen

    can I copy a window that is larger than the screen  without buying additional software like snagit ? Thanks. Zww27

  • I want to download 'my' videos from YouTube and Google Video

    i'm on: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6. and I am looking for a WORKABLE way to download my videos from YouTube and Google Video. When I download them straight from YouTube of GoogleVide