Connecting Tech Pros Worldwide Help | Site Map

Divide an image in 4 blocks

_kOws
Guest
 
Posts: n/a
#1: Apr 8 '08
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
Guest
 
Posts: n/a
#2: Apr 8 '08

re: Divide an image in 4 blocks


On Tue, 08 Apr 2008 16:19:07 +0200, _kOws wrote:
Quote:
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:
http://www.java-tips.org/java-se-tip...how-to-crop-a-
subimage-from-an-image-9.html

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