Results 1 to 2 of 2
- 09-12-2013, 04:33 PM #1Member
- Join Date
- Sep 2013
- Rep Power
Read pixels from image for last column
I've an interesting problem.
I've an image (PNG) with size 100x200, and I want to display it in 150X200.
So 50X200 area I've to fill with background based on image.
I want to use simple mechanism for that.
Take pixels from last column of image and pixels with interval 10.
i.e in above case i'll get 20 samples (100,0), (100,10)... (100,200).
Background color is calculated by taking average of Red, Green and blue of each sample.
Note: I've constraint to use subset of jdk-1.4 (J2ME with PBP 1.1).
I saw Bufferedimage & ColorModel APIs, but didn't get clear idea how it can be done.
Please give your valuable input.
- 09-12-2013, 04:37 PM #2
Re: Read pixels from image for last column
There are methods that do image resizing for you.
What have you tried? The BufferedImage class has a getRGB() method, so you can do whatever you want. What have you tried?
- By Deva in forum New To JavaReplies: 6Last Post: 04-01-2010, 09:35 PM
- By nithya.p in forum Java TipReplies: 0Last Post: 03-05-2009, 03:23 PM
- By Shyam Singh in forum New To JavaReplies: 7Last Post: 09-22-2008, 02:32 PM
- By Albert in forum Advanced JavaReplies: 1Last Post: 06-07-2007, 06:29 AM
- By Brightside in forum New To JavaReplies: 1Last Post: 05-22-2007, 10:21 AM