473,399 Members | 3,302 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,399 software developers and data experts.

JPEG/TIFF routines?

Does anyone know where I can find C subroutines to read JPEG and/or
TIFF files into 2-dimensional C arrays?
Nov 14 '05 #1
6 2688
usao <ro*@argus.lpl.arizona.edu> wrote:
Does anyone know where I can find C subroutines to read JPEG and/or
TIFF files into 2-dimensional C arrays?


This post is pretty off topic. This newsgroup is about ansi c.

As for what you're looking for, I personally like to use GTK, but I'm sure QT
has stuff for that as well. GTK is cross-platform, pretty, and well
organized. Check out gdkpixbufs and gtk-canvas widgets.

hth

--
Harrison Caudill | .^ www.hypersphere.org
Computer Science & Physics Double Major | | Me*Me=1
Georgia Institute of Technology | v' I'm just a normal guy
Nov 14 '05 #2
Charles Harrison Caudill <ku*****@myrna.cc.gatech.edu> scribbled the following:
usao <ro*@argus.lpl.arizona.edu> wrote:
Does anyone know where I can find C subroutines to read JPEG and/or
TIFF files into 2-dimensional C arrays?
This post is pretty off topic. This newsgroup is about ansi c. As for what you're looking for, I personally like to use GTK, but I'm sure QT
has stuff for that as well. GTK is cross-platform, pretty, and well
organized. Check out gdkpixbufs and gtk-canvas widgets.


I must have missed the part where the OP said anything about
*displaying* the *pictures* contained in those JPEG or TIFF files.
Reading them into 2-dimensional arrays can be done with 100% ISO C
code. How, don't ask me. But it can be done. What to do with those
arrays is anyone's guess.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I am looking for myself. Have you seen me somewhere?"
- Anon
Nov 14 '05 #3

"usao" <ro*@argus.lpl.arizona.edu> wrote in message news
Does anyone know where I can find C subroutines to read JPEG
and/or TIFF files into 2-dimensional C arrays?

You can only use a 2d array if you know the image dimensions at compile
time. Even here it will be a nuisance - the image[y][x] notation looks
tempting, but to use it all the functions that work on the image will have
to have the dimensions hardcoded in.
Much better to use malloc() and pass width and height around internally.
As for a JPEG codec, try a websearch for JPEG and "codec" (just searching
for "JPEG" brings up nothing but porn sites).
Nov 14 '05 #4
Joona I Palaste <pa*****@cc.helsinki.fi> wrote:
Charles Harrison Caudill <ku*****@myrna.cc.gatech.edu> scribbled the following:
usao <ro*@argus.lpl.arizona.edu> wrote:
Does anyone know where I can find C subroutines to read JPEG and/or
TIFF files into 2-dimensional C arrays?
As for what you're looking for, I personally like to use GTK, but I'm sure QT
has stuff for that as well. GTK is cross-platform, pretty, and well
organized. Check out gdkpixbufs and gtk-canvas widgets.
I must have missed the part where the OP said anything about
*displaying* the *pictures* contained in those JPEG or TIFF files.


true, but once you read an image into a gdk pixbuf, you can actually get an
array of data from it. That's how I manipulate STM images. Also, Matlab is
good for doing this:

img = imread('myImg.tiff');
figure;
imagesrc(img);

you can then tie your matlab code in w/ ansi c code; but don't ask me how.

hth

--
Harrison Caudill | .^ www.hypersphere.org
Computer Science & Physics Double Major | | Me*Me=1
Georgia Institute of Technology | v' I'm just a normal guy
Nov 14 '05 #5
usao wrote:
Does anyone know where I can find C subroutines to read JPEG and/or
TIFF files into 2-dimensional C arrays?


IJG has a very nice open source library for reading in or writing out
JPEG files. If it's not written in ANSI C, it's extraordinarily close
to it (which is why I feel justified in mentioning it). Start at
<http://www.ijg.org/>.

--
Pull out a splinter to reply.
Nov 14 '05 #6
ro*@argus.lpl.arizona.edu (usao) wrote:
Does anyone know where I can find C subroutines to read JPEG and/or
TIFF files into 2-dimensional C arrays?


Perhaps not C functions, but information you can use to write your own:
<http://www.wotsit.org/>. Very useful.

Richard
Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
7
by: Albert Greinöcker | last post by:
hi ng, I have a question concerning image processing in .NET: How can I open a jpeg with a tiff-header in c# (which means the file has the extension .tif, but contains jpeg-compressed data)?...
3
by: 246C57AE-40DD-4d6b-9E8D-B0F5757BB2A8 | last post by:
Hi. Why can't I read TIFFs compressed by JPEG using GDI+ Image class? I always get out of memory exception. Thanx.
2
by: ZUP_DUDE | last post by:
Hi All, I'm using the System.Drawing.Image name space to convert images from one type to another. In this case I am trying to convert a Tiff to a JPEG. The code is as simple as the next two...
4
by: Pushp | last post by:
Hello friends, Can any body tell me the sample code to convert a Tiff image to a Gif or Jpeg format. The Resolution of picture is a big concern keeping in mind. Hope to get the response...
10
by: rtilley | last post by:
Hope it's not inappropriate to post this here. Could someone critique my code? I have no Python programmers in my office to show this to. The script works OK, but should I do it differently? I...
1
by: Smokey Grindel | last post by:
I have a bitmap object I want to return as a JPEG image with a compression set at 90% and progressive passes enabled, how can I do this in .NET 2.0? Progressive passes are not necessary but the...
2
by: mndprasad | last post by:
hi all i am doing a project in java where i need to convert 10 jpeg images into a single tiff image..conversion of single jpeg image to single tiff is happening but embedding all the 10 jpeg images...
6
by: Victory | last post by:
Hi, I need to know the compression type of jpeg (jpg) files. I am using the System.Drawing.Imaging and loading the file using an Image object. The next thing i do, is to examine the propertyItems...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.