LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting string data to jpeg

could you attach  you txt file here is  the digits that you save between 0 to 255 or not ?

0 Kudos
Message 11 of 24
(2,331 Views)
Actually from other system I'm getting a image in fragments,using that data I want to reconstruct it as a image. How can I save data ..?? Is that binary format will work..??? If yes can u give some clues plzz
0 Kudos
Message 12 of 24
(2,307 Views)

Have you tried the binary format yet????? Why can't you just save the image in jpeg, png, or bmp format?

And to repeat what Altenbach asked, how are you getting it? Where does it come from?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 13 of 24
(2,294 Views)
I already told that I'm receiving a data from external system through UDP protocal,and I'm receiving data in fragments that I want to combine and make it as a image file that is my intension.
Presently I'm thinking about binary format whether it will store data without affecting to previous data or not...????
0 Kudos
Message 14 of 24
(2,277 Views)

This is the first you've mentioned UDP. I think Altenbach has a much better understanding of this than I do, but basically UDP doesn't have any handshaking so if you lose any packets during your image transfer, you will end up with a messed up image. That may be your problem here or it may be the conversion to a txt file.

You won't know what's going to work until you try it. If there is any more information you have for us (like maybe the code from the external system) please include that. You can simulate the external system communicating with your local system by doing the conversion and back-conversion within the same VI. You should be able to go from JPEG to binary to file then back to binary to JPEG without any issues.

 

 

P.S. This whole time I never noticed you could change the title of a reply until I got a notification about your response and it didn't have "Re:" at the beginning.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 15 of 24
(2,261 Views)

sir,

 

in external system image data deviding into fragments and each fragments sending in different time intervals through udp protocol, iam able to recieve the data in different time interval and i used write to binary file (here whatever data saved previously going to be deleted ) and iam unable to reconstruct the image (if i use write to file with EOL i can get image data with distortion).

 

presently my problem is iam unable to save complete image data wich is coming in fragments with different time interval.

please suggest me that how can  read data using binary file or write to text file (without usng EOL).

0 Kudos
Message 16 of 24
(2,233 Views)

Why don't you show is your code that receives and saves the data?

What is the device on the other side that is sending the data?

Does the communication include specail haders such as sequence numbers of file offsets, etc?

 

 

0 Kudos
Message 17 of 24
(2,212 Views)

@muniraj wrote:

sir,

 

in external system image data deviding into fragments and each fragments sending in different time intervals through udp protocol, iam able to recieve the data in different time interval and i used write to binary file (here whatever data saved previously going to be deleted ) and iam unable to reconstruct the image (if i use write to file with EOL i can get image data with distortion).

 

presently my problem is iam unable to save complete image data wich is coming in fragments with different time interval.

please suggest me that how can  read data using binary file or write to text file (without usng EOL).


It is also very possible that this is a color space issue. From what we can read from the text file this is a Photoshop 3.0 image using the JPEG File Interchange Format (JFIF).

 

From Wikipedia:

---------------------------------------------------------

Color space[edit]

JPEG does not define which color encoding is to be used for images. JFIF defines the color model to be used: either Y for greyscale, or YCbCr as defined by CCIR 601. Since this is not an absolute color space — unless an ICC profile, colorspace metadata, or an sRGB tag is provided and interpreted – a decoded JFIF image will be in a device-dependent RGB colorspace. Hence, JFIF does not by itself provide a mechanism for accurately transporting color-managed images across the Internet.

----------------------------------------------------------

 

I don't know what color space was used for the original file but it should probably be set tbasic RGB.

 

Ben64

 

 

 

0 Kudos
Message 18 of 24
(2,176 Views)

in external system(windows xp) image data deviding into fragments and each fragments sending in different time intervals through udp protocol, iam able to recieve the data in different time interval and i used write to binary file (here whatever data saved previously going to be deleted ) and iam unable to reconstruct the image (if i use write to file with EOL i can get image data with distortion).

 

presently my problem is iam unable to save complete image data wich is coming in fragments with different time interval.

please suggest me that how can  read data using binary file or write to text file (without usng EOL).

0 Kudos
Message 19 of 24
(2,144 Views)

@Hooovahh wrote:

Yes I'd suggest posting more details, more code, more data, more information.


Same comment, post the code that breaks it up into chunks, and post the code that reads the chunks and saves it.

0 Kudos
Message 20 of 24
(2,128 Views)