Re: using libjpeg
- From: Syren Baran <sbaran@xxxxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 18:04:16 +0100
oswald.harry@xxxxxxxxx schrieb:
hi
I have a char* imgnames[] that contain full path names of jpg files
(ie like "F:\myimgs\jpg\one.jpg",... etc) .I wish to read each
corresponding .jpg file and extract info into a struct ..and thus
create an array of structures.in each struct i would like to store
imgname,width,height,and value of each pixel(as a long?).
Pretty sure you´ll want to use int´s and not long´s. The typiclly used ARGB consists of 32bits.
may be like
struct myjpgfile{
char* imgfile;
int wdth;
int hgt;
long[] pixels;//as a 1 dimensional array
}
.I am told that cygwin has libjpeg library that can do this task..i
went thru the jpeglib.h file but couldn't make out which method should
be used..can someone help?
Dont know if using c++ is a option for you. The image module from SDL has exactly this, it`s called IMG_Load. Even if not, looking at that function`s, or more specificly IMG_LoadJPG_RW`s, source code should provide you with answers, since its linked against libjpeg.
thanx.
oharry
- Follow-Ups:
- Re: using libjpeg
- From: Spoon
- Re: using libjpeg
- References:
- using libjpeg
- From: oswald . harry
- using libjpeg
- Prev by Date: Re: Executing and Monitoring External Programs in C
- Next by Date: Re: recv() vs recvfrom()
- Previous by thread: using libjpeg
- Next by thread: Re: using libjpeg
- Index(es):
Relevant Pages
|