Connecting Tech Pros Worldwide Help | Site Map

Divide an image in 4 blocks

  #1  
Old June 27th, 2008, 05:16 PM
_kOws
Guest
 
Posts: n/a
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
  #2  
Old June 27th, 2008, 05:16 PM
Frank Stallone
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Divide an image in 4 blocks _kOws answers 1 April 8th, 2008 08:25 PM
Progress bar on composite control eladla answers 15 October 25th, 2006 06:45 AM
Divide html page in 4 equal rectangles Veerle answers 9 November 3rd, 2005 11:15 PM
Stratified random sampling with random_shuffle ? steflhermitte answers 1 July 23rd, 2005 04:26 AM