5,427,303 members and growing! (15,842 online)
Email Password   helpLost your password?
Multimedia » General Graphics » Graphics     Intermediate

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

By Alireza Naghizadeh

A simple code for converting image files to OTA file format (Mobile Picture Message).
C#, VC7.1, C++Windows, .NET, .NET 1.1, WinXPVS.NET2003, Visual Studio, Dev

Posted: 8 Jul 2005
Updated: 8 Jul 2005
Views: 54,022
Bookmarked: 14 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
16 votes for this Article.
Popularity: 4.24 Rating: 3.52 out of 5
2 votes, 12.5%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
2 votes, 12.5%
4
12 votes, 75.0%
5

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


Alireza Naghizadeh
Occupation: Software Developer (Senior)
Location: Iran, Islamic Republic Of Iran, Islamic Republic Of

Other popular General Graphics articles:

  • A flexible charting library for .NET
    Looking for a way to draw 2D line graphs with C#? Here's yet another charting class library with a high degree of configurability, that is also easy to use.
  • CxImage
    CxImage is a C++ class to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images.
  • 3D Pie Chart
    A class library for drawing 3D pie charts.
  • Really cool visual FX
    A set of classes for doing stunning visual effects, including water, plasma and fire.
  • ImageStone
    An article on a library for image manipulation.

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 22 of 22 (Total in Forum: 22) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralTrouble with creating picture msg with my n70memberNikhil Dhotre7:44 15 Jul '08  
GeneralRegarding OTAmemberMuthuganesh2:44 12 Jul '08  
GeneralSending OTA file via SMPP protocol to NOKIA SMSCmemberIftee3:51 17 Jan '08  
GeneralAbout OTA filememberTa Hoang Van15:58 9 Jan '08  
GeneralRe: About OTA filemembervenki_pandi23:57 3 Feb '08  
GeneralNeed more ideamembertykea_khy17:38 11 Dec '07  
GeneralSend Picture SMS as 1 SMS ( instead of conventional 3 SMS)memberNight Safari23:33 3 Nov '07  
GeneralRe: Send Picture SMS as 1 SMS ( instead of conventional 3 SMS)memberstyle of worlds22:12 19 Jan '08  
GeneralFor this .OTAfile i have to instal any software in my mobile?memberNarendra Mahalik2:56 24 Aug '07  
GeneralRe: For this .OTAfile i have to instal any software in my mobile?memberAlireza Naghizadeh5:48 9 Sep '07  
Generalhow to send image ?memberShakeel Mumtaz19:58 10 Jun '07  
GeneralPicture messagememberteznin2:14 5 Jan '07  
AnswerRe: Picture messagememberAlireza Naghizadeh19:26 6 Jan '07  
GeneralAbout This Programmemberpouriia11:03 28 Mar '06  
GeneralWant Details abt OTA file formatmemberimran_3jan20:14 15 Mar '06  
GeneralRe: Want Details abt OTA file format [modified]memberbasudekrishna20:37 28 May '06  
Generalwant details regarding ota image convertermemberimran_3jan20:07 15 Mar '06  
AnswerRe: want details regarding ota image convertermemberAlireza Naghizadeh6:04 1 Apr '06  
QuestionRe: want details regarding ota image convertermemberVGRamanath3:26 15 Jun '07  
AnswerRe: want details regarding ota image convertermemberstyle of worlds22:15 19 Jan '08  
NewsRe: want details regarding ota image convertermemberstyle of worlds22:17 19 Jan '08  
GeneralRe: want details regarding ota image convertermemberNarendra Mahalik2:39 24 Aug '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 8 Jul 2005
Editor: Smitha Vijayan
Copyright 2005 by Alireza Naghizadeh
Everything else Copyright © CodeProject, 1999-2008
Web13 | Advertise on the Code Project