Click here to Skip to main content
Licence 
First Posted 8 Jul 2005
Views 120,481
Downloads 4,143
Bookmarked 21 times

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

By Alireza Naghizadeh | 8 Jul 2005
A simple code for converting image files to OTA file format (Mobile Picture Message).
2 votes, 10.0%
1

2

3
2 votes, 10.0%
4
16 votes, 80.0%
5
4.76/5 - 20 votes
2 removed
μ 3.72, σa 2.16 [?]

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

About the Author

Alireza Naghizadeh

Software Developer (Senior)

Iran (Islamic Republic Of) Iran (Islamic Republic Of)

Member
Alireza Naghizadeh

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Questionhi Pinmembermohamad milaki3:08 7 Sep '11  
AnswerRe: hi PinmemberAlireza Naghizadeh19:31 7 Sep '11  
GeneralThank's - Saber Hayati Pinmemberbazyrayaneh13:15 15 Jun '11  
Generalwant a program in java to convert .jpg image into .ota format Pinmembershoaib_bagwan23:50 8 Sep '09  
GeneralRe: want a program in java to convert .jpg image into .ota format Pinmemberprabha vd20:19 15 Sep '10  
Generalhi, Pinmemberprashant.patel31@gmail.com3:22 13 Apr '09  
GeneralRe: hi, Pinmembermusyab22:10 17 Apr '09  
GeneralHello Sir Pinmemberoviyaa19:03 16 Feb '09  
QuestionHow to send pic msgs (.ota) By Nokia E51 ? Pinmemberundead_fred3:45 11 Nov '08  
AnswerRe: How to send pic msgs (.ota) By Nokia E51 ? PinmemberAlireza Naghizadeh5:18 11 Nov '08  
GeneralTrouble with creating picture msg with my n70 PinmemberNikhil Dhotre7:44 15 Jul '08  
GeneralRegarding OTA PinmemberMuthuganesh2:44 12 Jul '08  
GeneralSending OTA file via SMPP protocol to NOKIA SMSC PinmemberIftee3:51 17 Jan '08  
GeneralAbout OTA file PinmemberTa Hoang Van15:58 9 Jan '08  
GeneralRe: About OTA file Pinmembervenki_pandi23:57 3 Feb '08  
Hi,
 
Am also facing the same problem. Please reply if you got any solution.
GeneralNeed more idea Pinmembertykea_khy17:38 11 Dec '07  
GeneralSend Picture SMS as 1 SMS ( instead of conventional 3 SMS) PinmemberNight Safari23:33 3 Nov '07  
GeneralRe: Send Picture SMS as 1 SMS ( instead of conventional 3 SMS) Pinmemberstyle of worlds22:12 19 Jan '08  
QuestionFor this .OTAfile i have to instal any software in my mobile? PinmemberNarendra Mahalik2:56 24 Aug '07  
AnswerRe: For this .OTAfile i have to instal any software in my mobile? PinmemberAlireza Naghizadeh5:48 9 Sep '07  
Questionhow to send image ? PinmemberShakeel Mumtaz19:58 10 Jun '07  
AnswerRe: how to send image ? Pinmemberadnaneco20:13 18 Apr '09  
GeneralRe: how to send image ? PinmemberShakeel Mumtaz20:47 19 Apr '09  
GeneralRe: how to send image ? Pinmemberadnaneco3:54 20 Apr '09  
GeneralPicture message Pinmemberteznin2:14 5 Jan '07  

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

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

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