Results 1 to 2 of 2
  1. #1
    sojanmathew is offline Member
    Join Date
    Sep 2013
    Posts
    1
    Rep Power
    0

    Default Read pixels from image for last column

    Hi All,
    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.

    Regards
    Sojan

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default 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?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Image to pixels
    By Deva in forum New To Java
    Replies: 6
    Last Post: 04-01-2010, 08:35 PM
  2. convert Image to pixels
    By nithya.p in forum New To Java
    Replies: 0
    Last Post: 03-05-2009, 02:23 PM
  3. how to convert an image in to pixels
    By Shyam Singh in forum New To Java
    Replies: 7
    Last Post: 09-22-2008, 01:32 PM
  4. Replies: 1
    Last Post: 06-07-2007, 05:29 AM
  5. Deleting certain image pixels..
    By Brightside in forum New To Java
    Replies: 1
    Last Post: 05-22-2007, 09:21 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
  •