Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Picture encode/decode

Status
Not open for further replies.

kdg007

Full Member level 3
Joined
Jan 6, 2012
Messages
162
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,420
is there any software that decodes a picture into codes (html,c,c++ ) and encodes it back ?
-
operation should be...
1)upload a picture in the terminal
2)get the code language
3)paste the code language again
4)extract the picture from the coding.
 

Hello,

Assuming that you want to convert a picture into, for example, a C array of pixel information, I think you can use imagemagick convert tool (opensource) and some scripting. Check for the RGB text output format, it supports reading from this file format also I think, so you can reverse the process.

Hope it helps.

JF. Mousinho
 
  • Like
Reactions: kdg007

    kdg007

    Points: 2
    Helpful Answer Positive Rating
thank you.. its a bit confusing ... i am not able to upload a picture and get a code out of it
 
Last edited:

hiii,

He is trying to ask you how did you want to get the data from image.....ok here are my thoughts on this.....AS we know generally image in any compressed format let day jpg of png or even uncompressed image format like bmp or tiff....enconded in such a way that the data size is minimized....so if you consider a colour image of any of the format above .... most of time results as 3 matrix of colours RGB respectively....so if your image resolution is let say MxN e.g. let say VGA resoultion 640x480....after decoding you must get 3 matrix of R, G, B with MxN ( in current case 640x480 pixel resolution) ok....so in order to get this data....the first thing is how did you want this data....as a matrix or *.txt file or *.CSV file....

there are some of the open source softwares are avalible to do this for eg as mentioned by jemos is imagemagic.....also there is software called as FreeImage which dll you need to add in you project may be ( VC++ or C#) to get the data in R,G,B matrix format and then use it in the form of either matrix in debug mode of tool or else save them in *.text or *.CSV file....link for FreeImage is here refer this-

http://freeimage.sourceforge.net/

Good Luck and happy image processing
 
  • Like
Reactions: kdg007

    kdg007

    Points: 2
    Helpful Answer Positive Rating
An image consists of a two-dimensional array of numbers. The color or gray
shade displayed for a given picture element (pixel) depends on the number
stored in the array for that pixel. The simplest type of image data is black
and white. It is a binary image since each pixel is either 0 or 1.
-
i want the simplest type of the image converted into 1`s and 0`s ....or into any other language ....and reconvert again..
 

Hi Kdg007,

First of what did you mean by reconvert again.....look at this if you draw any thing on the Ms Paint and save it as bit map.... a very simple way to generate the image.... then it is 24bit resolution image ....i.e. you will get R = 8bit , G=8bit and B=8bit....Based on the color contents in the image respective pixel will get corresponding value....Now when you say Grey level image it generally has 8bit of resolution .....when you convert this picture in to let say binary 1bit image from 8bit image the information is already lost ..... let say your first pixel in grey scale image is 100 and second is 130 and one define the threshold or 128 that is half of the value of 8bit resolution ( 255 grey level value) you will get 0 and 1 as values of grey scale image converted in the binary image....Now problem you will not have the information about how much you need to scale for first and second image if you want to reconvert it back....so this will not work....also one need to develop an application for grey to binary conversion ....which you are taking.....

so binary image can not be converted to grey level image with out having some mechanism of storing scaling factor storing....but it will not work just like that....

Good Luck
 
  • Like
Reactions: kdg007

    kdg007

    Points: 2
    Helpful Answer Positive Rating
thanks for the information !!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top