**Please note i am testing out the application using WTK 2.2 as i do not have a phone to test on.
i am a student doing a project for my final yr. The application requires me to edit an image and save it in another file name, for example: newimage.png. I used the fileconnection from jsr75 and upon editing the image i dataoutputstream it to the file(newImage.png)... after the bytes are streamed to the file, i try to open it using my image editors in my computer but the file cannot be read... when i open the image file, using photoeditor or paint i get the error "cannot determine type". What can i do to view the image.
I am really in need of help... i am stuck can anyone suggest me ideas ? Thanks. Your help will be very much apprieciated. Thank you very much.
Just a thought ... when u send the image data and re-create the file as a png image ... are u making sure that the header bytes and the row header bytes are part of the new image ???
Everything that can go wrong will go wrong -Murphy
posted 14 years ago
sorry sir, can u please explain to me what is header bytes and row bytes ? sorry i am new to all this programming. When i stream it out it, the image has been written but the problem is the image editors can't read it... i am really lost... the file size becomes 127kb from 0kb and view the file's properties i see that the image has been just wrote to as the date and time are of that date and time.
You cannot edit an image file without understanding basic concepts like header bytes and row bytes. You need to read the spec for the PNG file format to understand how it organize the bytes in an image.
Your program probably wrote out the image data in the wrong format (i.e., not compliant to the PNG spec). [ September 17, 2004: Message edited by: Michael Yuan ]