Click here to Skip to main content
12,401,864 members (52,009 online)
Click here to Skip to main content
Add your own
alternative version

Stats

159.7K views
5.6K downloads
25 bookmarked
Posted

Converting image files to OTA file format (Mobile Picture Message)

, 8 Jul 2005
Rate this:
Please Sign up or sign in to vote.
A simple code for converting image files to OTA file format (Mobile Picture Message).

Introduction

I searched the internet for a program to convert the image files to the OTA file format, but there was none!!! So, I began researching for OTA file format details... finally, I wrote a program with C# to do this...

The source code and binary files are ready for download...

The main logic of this program is an algorithm for converting images. Mobile picture messages (OTA or OTB files) have a standard size: 72x28. First of all we must create a file (*.ota) and then write 4 standard bytes into it.

byte0 -> 0000 0000 (0)
byte1 -> 0100 1000 (72)
byte2 -> 0001 1100 (28)
byte3 -> 0000 0001 (1)

Now read image, pixel by pixel, from left to right and top to bottom, every 8 pixel makes a byte for writing to the file:

black pixels = 0
Other pixels = 1

An image with size 72x28:

has 72*28 = 2016 (bits)
every 8 bits = 1 byte => 2016 / 8 = 252
and 252(bytes) + 4(standard bytes) = 256 bytes

Finally, the file size is 256 bytes.

Download and read my source code to see this program working...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Alireza Naghizadeh
Software Developer (Senior)
Iran (Islamic Republic of) Iran (Islamic Republic of)
Alireza Naghizadeh

You may also be interested in...

Comments and Discussions

 
Questionhi Pin
mohamad milaki7-Sep-11 2:08
membermohamad milaki7-Sep-11 2:08 
AnswerRe: hi Pin
Alireza Naghizadeh7-Sep-11 18:31
memberAlireza Naghizadeh7-Sep-11 18:31 
GeneralThank's - Saber Hayati Pin
bazyrayaneh15-Jun-11 12:15
memberbazyrayaneh15-Jun-11 12:15 
Generalwant a program in java to convert .jpg image into .ota format Pin
shoaib_bagwan8-Sep-09 22:50
membershoaib_bagwan8-Sep-09 22:50 
GeneralRe: want a program in java to convert .jpg image into .ota format Pin
prabha vd15-Sep-10 19:19
memberprabha vd15-Sep-10 19:19 
Generalhi, Pin
prashant.patel31@gmail.com13-Apr-09 2:22
memberprashant.patel31@gmail.com13-Apr-09 2:22 
GeneralRe: hi, Pin
musyab17-Apr-09 21:10
membermusyab17-Apr-09 21:10 
GeneralHello Sir Pin
oviyaa16-Feb-09 18:03
memberoviyaa16-Feb-09 18:03 
QuestionHow to send pic msgs (.ota) By Nokia E51 ? Pin
undead_fred11-Nov-08 2:45
memberundead_fred11-Nov-08 2:45 
AnswerRe: How to send pic msgs (.ota) By Nokia E51 ? Pin
Alireza Naghizadeh11-Nov-08 4:18
memberAlireza Naghizadeh11-Nov-08 4:18 
GeneralTrouble with creating picture msg with my n70 Pin
Nikhil Dhotre15-Jul-08 6:44
memberNikhil Dhotre15-Jul-08 6:44 
GeneralRegarding OTA Pin
Muthuganesh12-Jul-08 1:44
memberMuthuganesh12-Jul-08 1:44 
GeneralSending OTA file via SMPP protocol to NOKIA SMSC Pin
Iftee17-Jan-08 2:51
memberIftee17-Jan-08 2:51 
GeneralAbout OTA file Pin
Ta Hoang Van9-Jan-08 14:58
memberTa Hoang Van9-Jan-08 14:58 
GeneralRe: About OTA file Pin
venki_pandi3-Feb-08 22:57
membervenki_pandi3-Feb-08 22:57 
GeneralNeed more idea Pin
tykea_khy11-Dec-07 16:38
membertykea_khy11-Dec-07 16:38 
GeneralSend Picture SMS as 1 SMS ( instead of conventional 3 SMS) Pin
Night Safari3-Nov-07 22:33
memberNight Safari3-Nov-07 22:33 
GeneralRe: Send Picture SMS as 1 SMS ( instead of conventional 3 SMS) Pin
style of worlds19-Jan-08 21:12
memberstyle of worlds19-Jan-08 21:12 
QuestionFor this .OTAfile i have to instal any software in my mobile? Pin
Narendra Mahalik24-Aug-07 1:56
memberNarendra Mahalik24-Aug-07 1:56 
AnswerRe: For this .OTAfile i have to instal any software in my mobile? Pin
Alireza Naghizadeh9-Sep-07 4:48
memberAlireza Naghizadeh9-Sep-07 4:48 
Questionhow to send image ? Pin
Shakeel Mumtaz10-Jun-07 18:58
memberShakeel Mumtaz10-Jun-07 18:58 
AnswerRe: how to send image ? Pin
adnaneco18-Apr-09 19:13
memberadnaneco18-Apr-09 19:13 
GeneralRe: how to send image ? Pin
Shakeel Mumtaz19-Apr-09 19:47
memberShakeel Mumtaz19-Apr-09 19:47 
GeneralRe: how to send image ? Pin
adnaneco20-Apr-09 2:54
memberadnaneco20-Apr-09 2:54 
GeneralPicture message Pin
teznin5-Jan-07 1:14
memberteznin5-Jan-07 1:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160721.1 | Last Updated 9 Jul 2005
Article Copyright 2005 by Alireza Naghizadeh
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid