473,586 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

converting an image file into binary form using Linux or Unix Script

3 New Member
hi :

i need to convert an image (ex: jpeg or gif) into binary form (which can uploadavle to a server) using unix or linux script. pls pass me if u have any code.

regards
Durga
Sep 27 '07 #1
3 4505
ruskalym
65 New Member
I suppose images already are in binary form :/
Sep 27 '07 #2
deardp
3 New Member
I suppose images already are in binary form :/
hi my task is i need to convert the image into some rawdata(which can be uploadable to server using XML). i can do the uploading part. but i want how to convert the image to binary form using unix script.

regards
Durga
Sep 27 '07 #3
ruskalym
65 New Member
There is a CDATA XML special tag but I don't know if how it behaves with raw binary dump.

If you really need data in text form, you can store it in hexadecimal based string (use hexdump command) but it will be at least twice larger than original file size.
Sep 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11752
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
21
39321
by: Sami Viitanen | last post by:
Hello, How can I check if a file is binary or text? There was some easy way but I forgot it.. Thanks in adv.
2
1818
by: Larry Rekow | last post by:
A friend's unix application produces various reports daily as flat text files. I link these files as tables in an Access (2000) database. After linking, all of these reports begin with a blank row; no problem. But the latest report I've asked, once linked, creates not only a blank row at the beginning, but a blank row after every row...
22
888
by: Sunner Sun | last post by:
Hi, all Since the OS look both ASCII and binary file as a sequence of bytes, is there any way to determine the file type except to judge the extension? Thank you!
5
1575
by: sc48567189 | last post by:
Hello ! I need some help here. I google after the response but with no sucess. I need to download - randon size - parts of a file, not the whole file. Says: I have the zip file test.zip, it is 10 mega bytes long. But I don't want the 10 mega today. Today I want 5 mega bytes. Tomorrow I could want more 3 mega bytes of the file, but it is not...
4
2386
by: Beginner | last post by:
How do I convert JPEG images to binary files in ASP.NET? Please advice. Thanks.
1
6466
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located...
5
2340
by: ozgun.harmanci | last post by:
Hi everyone, I had a big problem with line returns and carriage character difference in windows and linux. I think what happened was, the scp program i am using in to send file from windows machine to a linux machine did not somehow realize that the files i am uploading are ascii files and sent them as binary. When I tried to use those files,...
10
22648
by: rory | last post by:
I can't seem to append a string to the end of a binary file. I'm using the following code: fstream outFile("test.exe", ios::in | ios::out | ios::binary | ios::ate | ios::app) outFile.write("teststring", 10); outFile.close(); If I leave out the ios::ate and ios::app modes my string is written to the start of the file as I'd expect but I...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.