Results 1 to 3 of 3
  1. #1
    pedjacar is offline Member
    Join Date
    Oct 2008
    Posts
    4
    Rep Power
    0

    Lightbulb Cutting parts of an image and reordering them

    Hi people,

    I have checked the forums for image clipping, but it seems that no topic tackles this problem (I'm helping out my girlfriend with her MSc. thesis in psychology):

    I need to cut six pieces from an image of a human face (eyebrows, eyes, nosetip and mouth) and display them (only them, rest of the pic remains hidden) but each of them on different, randomly selected position of another piece (e.g. left eyebrow on the position of the mouth, right eyebrow on the position of left eye, left eye on the position of the nose and so on). Image dimensions and coordinates of the image parts are known.

    Any ideas? Thanks!
    Pedja

  2. #2
    zoomix is offline Member
    Join Date
    Oct 2008
    Location
    Sweden, Gothenburg
    Posts
    21
    Rep Power
    0

    Default

    BufferedImage has a method that can be useful.

    getSubimage(int x, int y, int w, int h)
    Returns a subimage defined by a specified rectangular region.

    I suppose you could load the original image, get the six subimages and draw them back onto a new image. Or is this not the kind of help you had in mind?

  3. #3
    pedjacar is offline Member
    Join Date
    Oct 2008
    Posts
    4
    Rep Power
    0

    Default

    Yes, that may be the trick I'm looking for...

    Is it also possible to extract elliptic part of the image with getSubimage method?

    Anyway, I'll try this for now...

    Thanks a lot, zoomix!

Similar Threads

  1. Canvas Image popups another image (SWT)
    By SpaceY in forum New To Java
    Replies: 2
    Last Post: 11-11-2008, 02:25 PM
  2. Replies: 2
    Last Post: 02-18-2008, 05:24 AM
  3. Replies: 0
    Last Post: 01-08-2008, 06:29 PM
  4. Selecting parts of an image
    By shaungoater in forum Java 2D
    Replies: 1
    Last Post: 12-15-2007, 11:06 PM
  5. Jtree - making parts editable
    By kmarie in forum AWT / Swing
    Replies: 1
    Last Post: 07-27-2007, 03:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •