Results 1 to 15 of 15
  1. #1
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default [SOLVED] manipulating the pixel values of an image and constructinf a new image from

    Hello everyone!

    I want to access the pixels of an image, manipulate them and construct a new image from these manipulated pixels.

    I have already grabbed the pixels using the PixelGrabber class. But I am unable to construct an image from pixels. I tried using MemoryImageSource class.

    With all the different interfaces and classes for reading and writing images, I am getting confused to use which one

    Are there any other ways for accessing the pixels?

    Any help in this matter is truly appreciated.
    Thanking you all in advance,
    With regards,
    Sruthi

  2. #2
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    441
    Rep Power
    6

    Default Hello

    First of all ,
    i welcome for your interest on image processing.
    First select which format of image you want to create using grabbed pixels.
    It is a vital thing to be considered for image creation.
    .................................................. ...........................
    Mak
    (Living @ Virtual World)

  3. #3
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default

    Thanks for replying! :)
    Well the image to be created should actually be the same format as the one from which we have read the pixels.
    If you want me to be specific, then it is "jpeg"

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default

    JPEG is a file format, not an image type. Don't confuse the two.

    db

  5. #5
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default

    Dear Mr. Darryl Burke,

    Could you please elaborate on the difference between image type and file formats?

    Thanking you,
    With warm regards,
    Sruthi

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default

    Once you've loaded the image in your program, it no longer matters what file type it came from. What matters is the color model and pixel size.

    Read through the fields of BufferedImage.TYPE_*** to know the image types supported by the class. Also read up on ColorModel and its subclasses.

    db

  7. #7
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default

    Dear Mr. Darryl Burke,


    The images are of TYPE_3BYTE_BGR

    With regards,
    Sruthi

  8. #8
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default

    Can anyone please help me!!!
    with warm regards,
    Sruthi :)

  9. #9
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    441
    Rep Power
    6

    Default

    Actually may i know what is the objective
    of your program.
    why i am asking this is,i want to be clear for your problem.
    Mak
    (Living @ Virtual World)

  10. #10
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default

    Hi
    Actually I have to do a project on steganography. So I need to access the pixels of an image and manipulate them to store the secret message(need to be encrypted using RSA) and reconstruct the image.
    with warm regards,
    Sruthi :)

  11. #11
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    Apparently, you are already at the Image class. From there, you should be able to access the bytes of the image itself. I assume you want to modify the values of each color channel a small amount to hold the bits of your encoded message.

  12. #12
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    441
    Rep Power
    6

    Default Hello Sruthi

    Actually
    i had done this project what i was in college.
    Instead of RSA ,i used some more algorithms.
    any way best of luck.

    As senior member told,you can extract byte value from image and encrypt with secret text and then reconstruct a image?

    i hope you are from india,is it?
    if you want to commnunicate with me ,mail me to makpandian@yahoo.co.in

    Thanks a lot.

    regards
    Mak
    Mak
    (Living @ Virtual World)

  13. #13
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default

    Hmm, off-forum communication somewhat defeats the purpose of having a discussion forum, doesn't it? And this forum even has a PM service, so why should anyone need to correspond by email?

    db

  14. #14
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    441
    Rep Power
    6

    Default

    you are right Darryl.Burke .
    but if we have a communication via e mail ,i will be able to share our thoughts quickly instead of login the site.

    anyway.Well
    Mak
    (Living @ Virtual World)

  15. #15
    sruthi_2009 is offline Member
    Join Date
    Feb 2009
    Posts
    32
    Rep Power
    0

    Default

    Thanks everyone for helping me out.
    Used Pixelgrabber class to grab the pixels and constructed a BufferedImage from the pixel array
    with warm regards,
    Sruthi :)

Similar Threads

  1. Scanning Image Pixel by Pixel
    By the_transltr in forum Advanced Java
    Replies: 5
    Last Post: 08-28-2012, 04:01 PM
  2. drawing an image to an offscreen image
    By hunterbdb in forum Java 2D
    Replies: 9
    Last Post: 10-30-2008, 06:17 PM
  3. Replies: 1
    Last Post: 08-25-2008, 08:48 PM
  4. Replies: 0
    Last Post: 01-08-2008, 05:29 PM
  5. Replies: 1
    Last Post: 07-17-2007, 04:10 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
  •