473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to read jpg file in C using turbo C

Hi all,

Thanx in Advance.. !

anyone can tel me that what is the architecture of jpg image file and .bmp image file. I want to display images in c evironment using conventional graphics and by programming the vga card. But i dont know the arcitecture of image files. plzzzzzz help me... in this regard... !

I will be thankful to u... !

Thanks again... in advance... !
Jan 17 '09 #1
6 6844
Turbo C is obsolete.
On Windows, use C/Win32 api : 2 lines of code to load a jpg or any graphic format.
Jan 18 '09 #2
newb16
687 512MB
If it were 32bit platform I would suggested freeimage that is opensource. But on 16-bit it would be tough. I would use some free jpg-to-bmp converter and run it from my program when needed. But ... wait. Is self-made jpg decompressor an essential part of your homework?
Jan 18 '09 #3
frreimage is useless nowadays
As I said, all image formats are native on Win32.
Jan 18 '09 #4
george, from where i may get the c/win32 api???
is it third party api ???
yaar i m tried to do it i got fifty percent work
but there is a problem
for example there is a bmp image file, its size is (x = 354, y= 322)
i opened it and i count its number of rows and columns per row
i found 1024 columns/row and total number of rows are 335

so in this regard 1024/354 = near to 3 it mans each pixel have three values and i started to take values for colors from row no 14 becuase 335 - 14 = 322 now i found a picture on screen of the size 354x322 but it is not proper displayed problem is that how to combine these rgb colors i used setrgbpallete() but i was failed to get colors... !
Jan 18 '09 #5
newb16
687 512MB
@HabibBhutto
IWICBitmapDecoder Interface ()
and around. Note minimal system reqs.

problem is that how to combine these rgb colors i used setrgbpallete() but i was failed to get colors... !
How many paletter entruies are there on your vga? 16 ? Not so much.
Jan 18 '09 #6
i have almost same project. but i get image code on compiler when i write this code on another file.tht will nt work properly. habib can u show me tht how u read image.?
Apr 27 '11 #7

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

Similar topics

28
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr();...
4
by: Martin Hvidberg | last post by:
Dear group I need to make a very simple piece of code in C, that can be command line executed and will compile on Linux, i.e. gcc. It should read a ascii Comma Separated Values (CSV) file and...
7
by: SunRise | last post by:
Hi I am creating a C Program , to extract only-Printable-characters from a file ( any type of file) and display them. OS: Windows-XP Ple help me to fix the Errors & Warnings and explain...
4
by: bibin | last post by:
Can somebody send me the math.h header file used in Turbo C
16
by: scott | last post by:
I am looking for a copy of Turbo C 1.5 from 1987 for some historical research I'm doing into computing from that time period.
2
by: 2005 | last post by:
Hi I have a code that compiles using Turbo C++ for DOS version 1.01 from http://community.borland.com/article/0,1410,21751,00.html What is that I need to do so that it cmpiles on Visual...
1
by: afshana | last post by:
I would like to know how to read data from paralel port in turbo C to a text file Please reply as soon as possible. Thank you
1
by: afshana | last post by:
I would like to know how to read data from paralel port in turbo C to a text file Please reply as soon as possible. Thank you
8
by: abhisheknaina | last post by:
how can an already existing exe file say <filename.exe> be executed using a turbo c++ program.... i have tried system(" path of file"); but it always returning an error i.e. the integer value...
10
by: ankurbahri | last post by:
hi !!! i wanna to know if we can access info. cloumn wise in an excel file using turbo c???? and if yes then how can we delete specific columns with thier data???
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.