summaryrefslogtreecommitdiff
path: root/libgphoto2/jpeg.c
Commit message (Collapse)AuthorAgeFilesLines
* Avoid accidental include file name collisionsHans Ulrich Niedermann2021-10-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are five libgphoto2 internal *.h include files inside the source tree's `libgphoto2/` folder. Internal means they are part of the libgphoto2 implementation, and are not part of the public libgphoto2 API or ABI. These files have names which are so generic that it is difficult to see from a `#include` statement that the included file is actually part of libgphoto2: bayer-types.h bayer.h exif.h gamma.h jpeg.h While building, an additional file is created inside the `libgphoto2/` folder with a name which does hint to its relationship with libgphoto2: gphoto2-endian.h To reduce the probability of accidental conflicts with include files which might also be called the same very generic name, this changes the use of these include files to a preprocessor directive like #include "libgphoto2/bayer.h> instead of #include "bayer.h" To enforce the need for the "libgphoto2/" part in the #include preprocessor directive, this also removes the respective `-I` arguments for the `libgphoto2` subdir (both in source tree and in build tree) from `*_CPPFLAGS`. This change was inspired by `libgphoto2/` and `camlibs/stv0680/` containing very different include files both called `bayer.h`.
* Use proper format string %hhX for unsigned charHans Ulrich Niedermann2016-10-291-1/+1
| | | | | | The old %hX string was for an unsigned short, but we pass an unsigned char. This silences another compiler warning.
* From: "Daniel P. Berrange" <dan@berrange.com>Marcus Meissner2014-04-111-2/+2
| | | | | | | | | | | | The gpi_jpeg_make_quantization and gpi_jpeg_header methods take a 'jpeg_quantization_table *' arg. The callers pass in a pointer to a 'const jpeg_quantization_table *' causing compile warnings about discarding const-ness. Mark the args as 'const' since their contents are never modified. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14891 67ed7778-7388-44ab-90cf-0a291f65f57c
* updated fsf addressMarcus Meissner2014-01-011-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14610 67ed7778-7388-44ab-90cf-0a291f65f57c
* unsigned intMarcus Meissner2013-12-211-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14598 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed 2 signedness issuesMarcus Meissner2007-12-311-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10920 67ed7778-7388-44ab-90cf-0a291f65f57c
* removed/ changed some includes to avoid unnecessary levelsMarcus Meissner2007-05-211-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10288 67ed7778-7388-44ab-90cf-0a291f65f57c
* marked up some files for doxygen.Marcus Meissner2007-05-201-2/+5
| | | | | | | marked 2 unexported variables static in gphoto2-settings.c. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10264 67ed7778-7388-44ab-90cf-0a291f65f57c
* check NULL pointer before using it. CID 101Hubert Figuiere2007-05-081-7/+10
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10121 67ed7778-7388-44ab-90cf-0a291f65f57c
* some NULL pointer checksMarcus Meissner2007-02-071-2/+8
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9991 67ed7778-7388-44ab-90cf-0a291f65f57c
* Consistently use #include <gphoto2/gphoto2-foo.h> everywhere.Hans Ulrich Niedermann2006-09-281-1/+1
| | | | | | | | | | This moves the header files to a new subdirectory gphoto2 in both libgphoto2 and libphoto2_port/libgphoto2. All references are adapted appropriately. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9221 67ed7778-7388-44ab-90cf-0a291f65f57c
* fix forgotten namespace fixes so that it links.Hubert Figuiere2005-06-121-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8076 67ed7778-7388-44ab-90cf-0a291f65f57c
* namespace cleanup still going on:Hans Ulrich Niedermann2005-06-111-65/+65
| | | | | | | | | | | | | | | | | - Add comments to Makefile.am about the different symbol names and their purposes, so that the rationale behind the *.sym contents may be found easily. - Remove libgphoto2/pattrec.[ch] - the only user was camlibs/konica/qm150.c and it hasn't been using it probably for years. - Rename all formerly exported symbols not starting with gp_* to gpi_* or gpe_* and try to export only those which are absolutely required by the camlibs. This still leaves a number of internal symbols exported, but at least their number is a lot lower than it was before. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8073 67ed7778-7388-44ab-90cf-0a291f65f57c
* <config.h> -> "config.h"Arnaud Launay2002-11-291-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@5859 67ed7778-7388-44ab-90cf-0a291f65f57c
* * position = position++; is illegal C, just use position++:Marcus Meissner2002-09-141-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@5268 67ed7778-7388-44ab-90cf-0a291f65f57c
* * libgphoto2/pattrec.cDan Fandrich2002-01-251-1/+2
| | | | | | | * libgphoto2/jpeg.c: Added include of config.h git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@4005 67ed7778-7388-44ab-90cf-0a291f65f57c
* Eliminated // comments in gphoto2 core for non-C99 compilersDan Fandrich2002-01-041-19/+19
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3708 67ed7778-7388-44ab-90cf-0a291f65f57c
* * libgphoto2/jpeg.[ch]: moved array definitions from .h to .cDan Fandrich2001-11-111-1/+16
| | | | | | | * libgphoto2_port/serial/unix.c: changed serial port prefix for Darwin git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2991 67ed7778-7388-44ab-90cf-0a291f65f57c
* * libgphoto2_port/include/gphoto2-portability.h:Dan Fandrich2001-10-261-9/+12
| | | | | | | | | | | * libgphoto2_port/include/gphoto2-port-parallel.h: * libgphoto2_port/include/gphoto2-port-serial.h: * libgphoto2_port/serial/unix.c: * libgphoto2/jpeg.c: Preliminary support for OS X/Darwin git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2749 67ed7778-7388-44ab-90cf-0a291f65f57c
* 2001-10-23 Lutz M�ller <urc8@rz.uni-karlsruhe.de>Lutz Mueller2001-10-231-1/+0
| | | | | | | | | | | | | * libgphoto2/gphoto2-core.[c,h]: Removed. All functions redirected to gphoto2-abilities-list. Caching of this list should be done in the frontend. * frontends/command-line/main.c: Don't use gp_autodetect, use gp_abilities_list_detect instead. * libgphoto2/setting.c: Move some initialization stuff from gphoto2-core to here. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2705 67ed7778-7388-44ab-90cf-0a291f65f57c
* added #include <string.h>Hans Ulrich Niedermann2001-10-201-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2661 67ed7778-7388-44ab-90cf-0a291f65f57c
* 2001-10-09 Lutz M�ller <urc8@rz.uni-karlsruhe.de>Lutz Mueller2001-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camlibs/agfa/agfa.c: delete_file_func, get_file_func * camlibs/canon/canon.c: Add warning that upload and deletion is broken * camlibs/jd350e/jd350e.c: Tiny update * camlibs/kodak/dc120/dc120.c: folder_list_func, file_list_func, get_file_func, delete_file_func * camlibs/kodak/dc240.c: Add warning that changes have to be made * camlibs/konica/library.c: delete_all_func, delete_file_func * camlibs/minolta/dimagev/dimagev.c: delete_file_func, put_file_func, * camlibs/panasonic/dc1000.c: file_list_func, get_file_func, put_file_func, delete_file_func * camlibs/panasonic/dc1580.c: get_file_func, put_file_func, delete_file_func * camlibs/panasonic/l859.c: delete_file_func, delete_all_func * camlibs/polaroid/pdc320.c: get_file_func, delete_all_func * camlibs/polaroid/pdc640.c: get_file_func, delete_file_func * camlibs/sierra/library.c: * camlibs/sierra/sierra.c: delete_all_func, delete_file_func * camlibs/sonydscf1/sonydscf1.c: delete_file_func * camlibs/sonydscf55/sonydscf55.c: Tiny update * camlibs/stv0680/stv0680.c: Tiny update * frontens/command-line/interface.c: Don't show "" status and 0.0 progress * libgphoto2/camera.c: * include/gphoto2-camera.h: Remove put_file, delete_all and delete - this should all be done using the filesystem. In the future, file_get and the listing functions will also disappear. * include/gphoto2-filesys.h: * libgphoto2/filesys.c: Add deletion and upload. * libgphoto2/jpeg.c: Kill unused variable * tests/test-filesys.c: Update git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2462 67ed7778-7388-44ab-90cf-0a291f65f57c
* Added in the code to put the standard JFIF marker in.Nathan Stenzel2001-09-261-4/+5
| | | | | | | Thanks, Michael Golden for the reminder. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2335 67ed7778-7388-44ab-90cf-0a291f65f57c
* Fixed gp_jpeg_make_quantization and changed the last parameter to char type.Nathan Stenzel2001-09-241-23/+38
| | | | | | | | More debugging code added. Fixed some errors. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2324 67ed7778-7388-44ab-90cf-0a291f65f57c
* 2001-09-24 Lutz M�ller <urc8@rz.uni-karlsruhe.de>Lutz Mueller2001-09-241-43/+44
| | | | | | | | * libgphoto2/jpeg.[c,h]: Respect the namespace of libjpeg. Otherwise, gtkam and other graphical frontends will horribly fail. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2320 67ed7778-7388-44ab-90cf-0a291f65f57c
* 2001-09-24 Lutz M�ller <urc8@rz.uni-karlsruhe.de>Lutz Mueller2001-09-241-0/+1
| | | | | | | * libgphoto2/jpeg.c: #define CHECK_RESULT(...) (...) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2316 67ed7778-7388-44ab-90cf-0a291f65f57c
* Added more functions.Nathan Stenzel2001-09-231-3/+86
| | | | | | | | You can now create a whole jpeg header from one line of code (almost). Creating prefilled chunks is now easier. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2312 67ed7778-7388-44ab-90cf-0a291f65f57c
* Added the functions to move data between quantization tables and theNathan Stenzel2001-09-231-37/+72
| | | | | | | quantization table markers. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2308 67ed7778-7388-44ab-90cf-0a291f65f57c
* Rewrote some of the functions.Nathan Stenzel2001-09-221-24/+97
| | | | | | | | | chunk_new now returns a pointer to a newly allocated chunk. quantization table handling was added including printing. You can now enter the quantization tables in a more visual form. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2304 67ed7778-7388-44ab-90cf-0a291f65f57c
* Changed "struct" to "typedef struct".Nathan Stenzel2001-09-131-12/+12
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2245 67ed7778-7388-44ab-90cf-0a291f65f57c
* Added GPL lines.Nathan Stenzel2001-09-131-5/+21
| | | | | | | | Some format fixes. Still need to use "typdef struct" instead of "struct". git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2244 67ed7778-7388-44ab-90cf-0a291f65f57c
* Fixing bugs.Nathan Stenzel2001-09-131-36/+39
| | | | | | | | Adding features. I tried adding this once but had to restart when the file got messed up. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2239 67ed7778-7388-44ab-90cf-0a291f65f57c
* Finished the parser.Nathan Stenzel2001-09-131-35/+101
| | | | | | | | Did full testing. Need to work on the new features next. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2236 67ed7778-7388-44ab-90cf-0a291f65f57c
* Created a chunk_new for jpeg.cNathan Stenzel2001-09-121-7/+13
| | | | | | | Fixed some formatting. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2233 67ed7778-7388-44ab-90cf-0a291f65f57c
* Completed more of the code.Nathan Stenzel2001-09-121-17/+37
| | | | | | | | | Fixed some problems. Added debugging output via a printf and a commented out gp_debug_printf This should be safe enough to be put in the Makefile now git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2232 67ed7778-7388-44ab-90cf-0a291f65f57c
* I added jpeg.c file to bring jpeg parsing to gphoto2.Nathan Stenzel2001-09-111-0/+74
I have hopes that this will match exif.c in quality. I plan on having jpeg.c be able to fill in missing data or let you fill it in manually. I plan on giving it the ability to decode and write jpeg files too. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2231 67ed7778-7388-44ab-90cf-0a291f65f57c