Tigran Aivazian
d76eb27fa3
Get rid of unused variable in getCacheSize()
2012-10-16 12:50:02 +01:00
Tigran Aivazian
56946f7393
Cleanup of pic.c
...
1. Report the true size of the document cache (0).
2. Cut down the number of pointer dereferences in drawPage().
2012-10-13 09:39:34 +01:00
Tigran Aivazian
daeb7ae7c8
Comment out [currently] unused variables.
2012-10-12 10:55:46 +01:00
Tigran Aivazian
a1f9068d5b
Factor out JPEG support into a module
...
This is to make adding support for new formats easier.
See the file pic_jpeg.h for the description of the interface that each
image format must support.
2012-10-12 09:36:08 +01:00
Tigran Aivazian
2ca5c028c1
Initialize doc->image in openDocument
...
This is needed to protect against double free() in closeDocument().
2012-10-11 22:54:04 +01:00
Tigran Aivazian
b63edfca1f
Free raw_image if it is unsupported.
...
If the number of colour components is neither 1 nor 3 we should remember
to free the buffer holding the raw decoded image before returning the
error to Lua.
2012-10-11 22:34:18 +01:00
Tigran Aivazian
669d84df18
Show the number of colour components via Menu.
2012-10-11 22:22:45 +01:00
Tigran Aivazian
f0511ff22c
Make closeDocument() re-entrant.
2012-10-11 22:19:33 +01:00
Tigran Aivazian
5823ab0c44
Slight tidy-up of the code.
2012-10-11 22:10:02 +01:00
Tigran Aivazian
2d2e2b6216
Add support for colour JPEG images.
...
I used the luminance match algorithm for converting RGB colour images to
grayscale as it gives the best visual results (but at the cost of speed).
2012-10-11 22:01:26 +01:00
Tigran Aivazian
13646a3d51
Support only grayscale images for now.
2012-10-10 13:15:16 +01:00
Tigran Aivazian
aa3bfb8439
Add simple scaling support.
2012-10-10 13:09:25 +01:00
Tigran Aivazian
8d88aa8901
Fix the "upside down mirror image" problem.
2012-10-08 22:52:57 +01:00
Tigran Aivazian
76d91a9ec4
Render grayscale images.
2012-10-08 20:53:59 +01:00
Tigran Aivazian
b2b9f425dd
Decode the JPEG's dimensions.
2012-10-08 18:54:44 +01:00
Tigran Aivazian
30de5e0a23
Initial commit of picviewer.
2012-10-08 16:39:03 +01:00