Divide an image in 4 blocks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • _kOws

    #1

    Divide an image in 4 blocks

    Hi,

    I'm writing a program that loads an image and then apply JPEG
    algorithm on it.
    I need to apply such algorithm only to a quarter of the image, possibly
    selecting which quarter.

    I don't really know how to divide in quarter an image in Java: I think
    that if I can divide the image in 4 images then I can use each image
    as a quarter, and apply the algorithm as I'm doing now on the original
    image.

    Can someone help me?

    Thank you very much, and sorry for my poor english!
    Regards,

    Gabriele
  • Frank Stallone

    #2
    Re: Divide an image in 4 blocks

    On Tue, 08 Apr 2008 16:19:07 +0200, _kOws wrote:
    Hi,
    >
    I'm writing a program that loads an image and then apply JPEG algorithm
    on it.
    I need to apply such algorithm only to a quarter of the image, possibly
    selecting which quarter.
    >
    I don't really know how to divide in quarter an image in Java: I think
    that if I can divide the image in 4 images then I can use each image as
    a quarter, and apply the algorithm as I'm doing now on the original
    image.
    >
    Can someone help me?
    >
    Thank you very much, and sorry for my poor english! Regards,
    >
    Gabriele
    I've never done it but I can't imagine it's impossible since you can do
    it in PHP.

    A quick search turned up this:

    subimage-from-an-image-9.html

    You should be able to pull the necessary bits out from it for your own
    purpose.

    Comment

    Working...