Qingping Hou
625de9b260
update pic.c from latest code
...
after lots of cherry-pick I found that for some strange reason,
pic.c is not updated and I cannot find out which commit I missed.
So I simply copied the latest pic.c from the master branch here.
2012-10-31 22:54:36 -04:00
Tigran Aivazian
503c9b077d
Initial commit of picviewer.
...
Conflicts:
Makefile
extentions.lua
pic.c
reader.lua
2012-10-31 22:09:27 -04:00
Tigran Aivazian
da88ca7a09
Get rid of unused variable in getCacheSize()
2012-10-31 21:19:54 -04:00
Tigran Aivazian
9c4a7ab860
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-31 21:08:20 -04:00
Tigran Aivazian
d747739b35
Comment out [currently] unused variables.
2012-10-31 21:06:06 -04:00
Tigran Aivazian
6c9a3c3dc5
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.
Conflicts:
Makefile
2012-10-31 20:54:24 -04:00
Tigran Aivazian
8c6fd35789
Initialize doc->image in openDocument
...
This is needed to protect against double free() in closeDocument().
2012-10-31 20:48:26 -04:00
Tigran Aivazian
01ce094adb
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-31 20:48:19 -04:00
Tigran Aivazian
74a60eeea2
Show the number of colour components via Menu.
...
Conflicts:
picviewer.lua
2012-10-31 20:46:28 -04:00
Tigran Aivazian
ee59fac328
Make closeDocument() re-entrant.
2012-10-31 20:46:11 -04:00
Tigran Aivazian
7609fc2dd0
Slight tidy-up of the code.
2012-10-31 20:45:50 -04:00
Tigran Aivazian
cac63cd390
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-31 20:43:41 -04:00
Tigran Aivazian
b56f4bf958
Support only grayscale images for now.
2012-10-31 20:25:21 -04:00
Tigran Aivazian
6d23997442
Add simple scaling support.
...
Conflicts:
pic.c
2012-10-31 20:24:59 -04:00