Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2009, 07:10 PM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 02-06-2009, 04:12 PM
makpandian's Avatar
Senior Member
 
Join Date: Dec 2008
Location: Chennai
Posts: 253
Rep Power: 2
makpandian is on a distinguished road
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)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-07-2009, 05:42 PM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
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"
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-07-2009, 06:25 PM
Darryl.Burke's Avatar
Senior Member
 
Join Date: Sep 2008
Location: Madgaon, Goa, India
Posts: 739
Rep Power: 2
Darryl.Burke is on a distinguished road
Default
JPEG is a file format, not an image type. Don't confuse the two.

db
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 02-08-2009, 06:50 AM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
Default
Dear Mr. Darryl Burke,

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

Thanking you,
With warm regards,
Sruthi
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 02-08-2009, 12:02 PM
Darryl.Burke's Avatar
Senior Member
 
Join Date: Sep 2008
Location: Madgaon, Goa, India
Posts: 739
Rep Power: 2
Darryl.Burke is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 02-08-2009, 07:09 PM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
Default
Dear Mr. Darryl Burke,


The images are of TYPE_3BYTE_BGR

With regards,
Sruthi
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 02-10-2009, 07:08 AM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
Default
Can anyone please help me!!!
__________________
with warm regards,
Sruthi
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 02-12-2009, 08:50 AM
makpandian's Avatar
Senior Member
 
Join Date: Dec 2008
Location: Chennai
Posts: 253
Rep Power: 2
makpandian is on a distinguished road
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)
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 02-12-2009, 03:44 PM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 02-12-2009, 06:49 PM
Steve11235's Avatar
Senior Member
 
Join Date: Dec 2008
Posts: 972
Rep Power: 2
Steve11235 is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 02-14-2009, 10:17 AM
makpandian's Avatar
Senior Member
 
Join Date: Dec 2008
Location: Chennai
Posts: 253
Rep Power: 2
makpandian is on a distinguished road
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)
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 02-14-2009, 12:47 PM
Darryl.Burke's Avatar
Senior Member
 
Join Date: Sep 2008
Location: Madgaon, Goa, India
Posts: 739
Rep Power: 2
Darryl.Burke is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #14 (permalink)  
Old 02-16-2009, 12:27 PM
makpandian's Avatar
Senior Member
 
Join Date: Dec 2008
Location: Chennai
Posts: 253
Rep Power: 2
makpandian is on a distinguished road
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)
Bookmark Post in Technorati
Reply With Quote
  #15 (permalink)  
Old 04-10-2009, 09:46 AM
Member
 
Join Date: Feb 2009
Posts: 32
Rep Power: 0
sruthi_2009 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
drawing an image to an offscreen image hunterbdb Java 2D 9 10-30-2008 07:17 PM
How to show pixel Coordinate and RGB value when mouse is tracking over an image Mazharul Java 2D 1 08-25-2008 09:48 PM
Scanning Image Pixel by Pixel the_transltr Advanced Java 3 05-28-2008 10:45 PM
Converting multiple banded image into single banded image... Image enhancement archanajathan Advanced Java 0 01-08-2008 06:29 PM
How can I get a transparent pixel from an image samson Java 2D 1 07-17-2007 05:10 AM


All times are GMT +2. The time now is 09:47 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org