Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/epeg
Dir : e17/libs/epeg
Modified Files:
epeg.c.in gendoc
Log Message:
*GASP* documentation! complete. Yes, I could be much more explicit and wordy,
but this does the job. All API calls are documented and theres a small
example program.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/epeg/epeg.c.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- epeg.c.in 29 Oct 2003 12:47:54 -0000 1.2
+++ epeg.c.in 2 Nov 2003 12:27:29 -0000 1.3
@@ -1,8 +1,8 @@
/**
@file
[EMAIL PROTECTED] Epeg JPEG Thumbnailer
[EMAIL PROTECTED] Epeg JPEG Thumbnailer library
-These routines are used for Epeg.
+These routines are used for the Epeg library.
*/
/**
@@ -17,6 +17,67 @@
An IMMENSELY FAST JPEG thumbnailer library API.
[EMAIL PROTECTED] Complete documentation of API
+Why write this? It's a convenience librayr API to using libjpeg to load JPEG
+images destined to be turned into thumbnails o the original, saving information
+with these thumbnails, retireveing it and managing to load the image ready for
+scaling with the minimum of fuss and CPU overhead.
+
+This means it's insanely fast at loading large JPEG images and scaling them
+down to tiny thumbnails. It's speedup will be proportional to the size
+difference between the source image and the output thumbnail size as a
+count of their pixels.
+
+It makes use of libjpeg features of being able to load an image by only
+deocding the DCT coefficients needed to reconstruct an image of the size
+desired. This gives a massive speedup. If you do not try and access the pixels
+in a format other than YUV (or GRAY8 if the source is grascale) then it also
+avoids colorspace conversions as well.
+
+Using the library is very easy, look at this example:
+
[EMAIL PROTECTED]
+#include "Epeg.h"
+
+int
+main(int argc, char **argv)
+{
+ Epeg_Image *im;
+
+ if (argc != 3)
+ {
+ printf("Usage: %s input.jpg thumb.jpg\n", argv[0]);
+ exit(0);
+ }
+ im = epeg_file_open(argv[1]);
+ if (!im)
+ {
+ printf("Cannot open %s\n", argv[1]);
+ exit(-1);
+ }
+
+ epeg_decode_size_set (im, 128, 96);
+ epeg_quality_set (im, 75);
+ epeg_thumbnail_comments_enable (im, 1);
+ epeg_file_output_set (im, argv[2]);
+ epeg_encode (im);
+ epeg_close (im);
+
+ return 0;
+}
[EMAIL PROTECTED]
+
+You can compile this program with as small a line as:
+
[EMAIL PROTECTED]
+gcc epeg_test.c -o epeg_test `epeg-config --cflags --libs`
[EMAIL PROTECTED]
+
+It is a very simple library that just makes life easier when tyring to
+generate lots of thumbnails for large JPEG images as quickly as possible.
+Your milage may vary, but it should save you lots of time and effort in using
+libjpeg in general.
+
[EMAIL PROTECTED] Check all input parameters for sanity.
[EMAIL PROTECTED] Actually report error conditions properly.
*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/epeg/gendoc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- gendoc 29 Oct 2003 12:44:47 -0000 1.1
+++ gendoc 2 Nov 2003 12:27:30 -0000 1.2
@@ -1,11 +1,11 @@
#!/bin/sh
cp ./epeg.c.in ./epeg.c
-for I in `find ./src/lib -name "Epeg.h" -print`; do
- cat $I >> ./epeg.c
-done
-#for I in `find ./src/lib -name "*.c" -print`; do
+#for I in `find ./src/lib -name "Epeg.h" -print`; do
# cat $I >> ./epeg.c
#done
+for I in `find ./src/lib -name "*.c" -print`; do
+ cat $I >> ./epeg.c
+done
rm -rf ./doc/html ./doc/latex ./doc/man
doxygen
cp doc/img/*.png doc/html/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs