Commit Graph

14 Commits (df7f7714e444dd870616056abbc34f5317060862)

Author SHA1 Message Date
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.
12 years ago
Tigran Aivazian 503c9b077d Initial commit of picviewer.
Conflicts:

	Makefile
	extentions.lua
	pic.c
	reader.lua
12 years ago
Tigran Aivazian da88ca7a09 Get rid of unused variable in getCacheSize() 12 years ago
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().
12 years ago
Tigran Aivazian d747739b35 Comment out [currently] unused variables. 12 years ago
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
12 years ago
Tigran Aivazian 8c6fd35789 Initialize doc->image in openDocument
This is needed to protect against double free() in closeDocument().
12 years ago
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.
12 years ago
Tigran Aivazian 74a60eeea2 Show the number of colour components via Menu.
Conflicts:

	picviewer.lua
12 years ago
Tigran Aivazian ee59fac328 Make closeDocument() re-entrant. 12 years ago
Tigran Aivazian 7609fc2dd0 Slight tidy-up of the code. 12 years ago
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).
12 years ago
Tigran Aivazian b56f4bf958 Support only grayscale images for now. 12 years ago
Tigran Aivazian 6d23997442 Add simple scaling support.
Conflicts:

	pic.c
12 years ago