Read and decode jpg-pictures - c

I have an old program written about 1990 but modified several times. Around 2005 I started to use a program PixOps.c from Apple Computer to read different kinds of picture files.
It has worked very well until I changed to Apple's new system Mountain Lion. Now I get several errors. Unfortunately PixOps uses a number of routines not available in Mountain Lion any longer.
Can anyone help me how to find a C routine to read JPEG-images from a file, decode them and store them in a simple bitmap? My program manipulates the picture and then the program draws the new picture on the screen. After that I also want to write the new picture back to a file as a JPEG-picture.

You should look into using a library. The standard for JPEG is called libjpeg. It works on most typical operating systems, including Mac OS X.
The project is also on SourceForge, here.

Related

File Operation issue while porting to Altera NIOS II

I've recently started porting the C implementation of my project to the NIOS II system and I seem to have hit a snag. My original implementation uses file operations (fopen, fscanf, fgets,etc.). However I'm using the University Program IP Core and therefore have to use the HAL functions provided by Altera.
So the question is, will I have to rewrite the portions where I read in formatted text and read byte by byte and then format? Or is it possible to keep my current code?
PS
I am using Quartus II 13.0 with Eclipse Build Tools and my development board is the Altera DE1.
The only solution I could think of is to save my whole text file into an array and then change the formatted file operations to their string counterparts, however this would probably take up a lot of space. I don't think using an OS on the NIOS II is an option for me either.

How do I write Arduino readings to a file on the computer?

I want to write Arduino's data readings to a file locally on the computer. I MUST do this in C for a specific reason. Also, I am working in Windows 7 not Linux.
I couldn't find any useful codes on the internet that satisfies my requirement. Can anyone help?
You should think about Processing it uses the same IDE as the Arduino. It has common libraries for sending data back and forth between the Arduino and host PC. Where Processing is built on Java, its code that you write looks just like that of the Arduino's C++

Are there some references left for the Mac OS Classic runtime?

I'm working on an implementation of the Mac OS Classic runtime to run Classic programs on OS X again. The project includes a PowerPC emulator, a PEF executable linker, and the possibility to call into native (x86) code.
The emulator and the linker seem to work well, so I've shifted my focus towards (re)implementing Mac OS Classic libraries. I am currently trying to run MPW tools with my "emulator"; grabbing a copy of the MPW Shell literally just hours before Apple pulled it from its servers and running it inside SheepShaver, I compiled your generic "Hello World!" program and I am able to run it successfully.
However, that's about as far as compatibility goes. As I tried to run the Unmangle program, I found that it is trying to access _IntEnv and __NubAt3, two StdCLib exported globals, for which there apparently remains no documentation. (Google still has some Apple mailing list results for linkage problems in the early days of Mac OS X; Bing and Yahoo! turn back no result.)
I find that lack of documentation particularly upsetting. I am sometimes able to guess the globals' layout with Classic header files or even how they're used in programs with the disassembly, but it's not really efficient and there's nothing to tell me I got it right.
And even if I get most of StdCLib right, I'll still need documentation about other libraries at some point.
Where can I find documentation about the Mac OS Classic runtime?
You may still be able to find some relevant Inside Macintosh volumes among what remains of Apple's classic Mac developer documentation.

generating videos in C

I'm looking for advice on how to generate videos in C. The main issues I'll be dealing with are
Must be open source, would prefer BSD type license but GPL is acceptable
Must be reasonably well documented (I'm looking at you FFMPEG)
Must be able to generate a non-compressed video
Must be able to draw each frame
Should be able to set the frame rate (though of course I can just make n identical frames)
My toolkit is the GNU development system on UNIX like systems (Linux, OS X, Cygwin, ...)
Having said that, I'm picky about these requirements because if I don't have them I know I can pretty easily generate the individual frames with libgd and use ffmpeg commands to output a video. The point is that I'd rather be able to draw them and generate the video entirely in my C code. Even better would be to be able to provide the library in my own source (BSD license) so that my users don't need to worry about getting things installed on their particular platform.
I'm not set on a video codec other than the availability of non-compressed video (I'm visualizing changes in simulated rotational spectroscopy as rotational parameters or other variables like temperature change). Advice on a particular codec welcome.

How to Program in C for Hengstler C51 Thermal receipt Printer

I am working on project where I need to print a receipt through a Hengstler C51 Thermal Printer. The device is working fine and it's printing images too.
I need to write a C program which can open my printer and print my preformatted receipt which is going to contain a simple logo.
I can not figure out how to proceed.
The API Documentations given by Hengstler really stinks. I installed all their drivers and API libs though. I am using Ubuntu 11.04.
I am looking for some sample or demo programs to start from.
might just be easier to make program that creates your image file instead of programming the printer. I can't find anything on this thing. Your best bet is to trial and error on that API and Docs they provide, if you don't like my idea.

Resources