JPEG issue February 01, 2010 09:52AM | Registered: 15 years ago Posts: 98 |
Re: JPEG issue February 01, 2010 02:17PM | Registered: 16 years ago Posts: 175 |
Re: JPEG issue February 01, 2010 08:48PM | Registered: 15 years ago Posts: 98 |
Re: JPEG issue February 01, 2010 10:10PM | Registered: 16 years ago Posts: 175 |
Re: JPEG issue February 01, 2010 10:11PM | Registered: 15 years ago Posts: 379 |
Re: JPEG issue February 01, 2010 10:54PM | Registered: 15 years ago Posts: 98 |
Do you mean that depending on what's on the slide when I save it as a JPG image I'll get an output or another? or do you mean that depending on which pixel format I input to my wii I'll get an output or another? Do you have any suggestions of how to force/convert a format or/to another?Quote
Daid
And it depends on the input what kind of output you get.
Re: JPEG issue February 01, 2010 11:15PM | Registered: 16 years ago Posts: 175 |
Quote
change.log
Version 8 10-Jan-2010
----------------------
jpegtran now supports the same -scale option as djpeg for "lossless" resize.
An implementation of the JPEG SmartScale extension is required for this
feature. A (draft) specification of the JPEG SmartScale extension is
available as a contributed document at ITU and ISO. Revision 2 or later
of the document is required (latest document version is Revision 3).
The SmartScale extension will enable more features beside lossless resize
in future implementations, as described in the document (new compression
options).
Add sanity check in BMP reader module to avoid cjpeg crash for empty input
image (thank to Isaev Ildar of ISP RAS, Moscow, RU for reporting this error).
Add data source and destination managers for read from and write to
memory buffers. New API functions jpeg_mem_src and jpeg_mem_dest.
Thank to Roberto Boni from Italy for the suggestion.
Version 7 27-Jun-2009
----------------------
New scaled DCTs implemented.
djpeg now supports scalings N/8 with all N from 1 to 16.
cjpeg now supports scalings 8/N with all N from 1 to 16.
Scaled DCTs with size larger than 8 are now also used for resolving the
common 2x2 chroma subsampling case without additional spatial resampling.
Separate spatial resampling for those kind of files is now only necessary
for N>8 scaling cases.
Furthermore, separate scaled DCT functions are provided for direct resolving
of the common asymmetric subsampling cases (2x1 and 1x2) without additional
spatial resampling.
cjpeg -quality option has been extended for support of separate quality
settings for luminance and chrominance (or in general, for every provided
quantization table slot).
New API function jpeg_default_qtables() and q_scale_factor array in library.
Added -nosmooth option to cjpeg, complementary to djpeg.
New variable "do_fancy_downsampling" in library, complement to fancy
upsampling. Fancy upsampling now uses direct DCT scaling with sizes
larger than 8. The old method is not reversible and has been removed.
Support arithmetic entropy encoding and decoding.
Added files jaricom.c, jcarith.c, jdarith.c.
Straighten the file structure:
Removed files jidctred.c, jcphuff.c, jchuff.h, jdphuff.c, jdhuff.h.
jpegtran has a new "lossless" cropping feature.
Implement -perfect option in jpegtran, new API function
jtransform_perfect_transform() in transupp. (DP 204_perfect.dpatch)
Better error messages for jpegtran fopen failure.
(DP 203_jpegtran_errmsg.dpatch)
Fix byte order issue with 16bit PPM/PGM files in rdppm.c/wrppm.c:
according to Netpbm, the de facto standard implementation of the PNM formats,
the most significant byte is first. (DP 203_rdppm.dpatch)
Add -raw option to rdjpgcom not to mangle the output.
(DP 205_rdjpgcom_raw.dpatch)
Make rdjpgcom locale aware. (DP 201_rdjpgcom_locale.dpatch)
Add extern "C" to jpeglib.h.
This avoids the need to put extern "C" { ... } around #include "jpeglib.h"
in your C++ application. Defining the symbol DONT_USE_EXTERN_C in the
configuration prevents this. (DP 202_jpeglib.h_c++.dpatch)
Re: JPEG issue February 04, 2010 11:35AM | Registered: 15 years ago Posts: 34 |
Re: JPEG issue February 04, 2010 04:32PM | Registered: 16 years ago Posts: 175 |
I gave the link to the GRRLIB repository previously: [code.google.com]Quote
diego_pmc
Crayon, could you please give me a downlaod link to the new version of libjpeg? :)
Re: JPEG issue February 06, 2010 12:49AM | Registered: 15 years ago Posts: 116 |
Re: JPEG issue February 06, 2010 07:32AM | Registered: 15 years ago Posts: 98 |
Re: JPEG issue February 06, 2010 08:19AM | Registered: 16 years ago Posts: 78 |
struct jpeg_decompress_struct info; // JPEG init stuff removed if ( info.jpeg_color_space == JCS_GRAYSCALE ) { info.out_color_space = JCS_RGB; } // continue with decompression
Re: JPEG issue February 06, 2010 09:29AM | Registered: 15 years ago Posts: 98 |
Re: JPEG issue February 07, 2010 12:32AM | Registered: 16 years ago Posts: 78 |
GRRLIB_texImg* GRRLIB_LoadTextureJPGEx (const u8 *my_jpg, const int my_size) { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; GRRLIB_texImg *my_texture = calloc(1, sizeof(GRRLIB_texImg)); unsigned int i; if(my_texture == NULL) return NULL; jpeg_create_decompress(&cinfo); cinfo.err = jpeg_std_error(&jerr); cinfo.progress = NULL; jpeg_mem_src(&cinfo, (unsigned char *)my_jpg, my_size); jpeg_read_header(&cinfo, TRUE); if (cinfo.jpeg_color_space == JCS_GRAYSCALE) { cinfo.out_color_space = JCS_RGB; } jpeg_start_decompress(&cinfo); unsigned char *tempBuffer = malloc(cinfo.output_width * cinfo.output_height * cinfo.output_components); JSAMPROW row_pointer[1]; row_pointer[0] = malloc(cinfo.output_width * cinfo.output_components); size_t location = 0; while (cinfo.output_scanline < cinfo.output_height) { jpeg_read_scanlines(&cinfo, row_pointer, 1); for (i = 0; i < cinfo.image_width * cinfo.output_components; i++) { /* Put the decoded scanline into the tempBuffer */ tempBuffer[ location++ ] = row_pointer[0]; } } /* Create a buffer to hold the final texture */ my_texture->data = memalign(32, cinfo.output_width * cinfo.output_height * 4); RawTo4x4RGBA(tempBuffer, my_texture->data, cinfo.output_width, cinfo.output_height); /* Done - Do cleanup and release allocated memory */ jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); free(row_pointer[0]); free(tempBuffer); my_texture->w = cinfo.output_width; my_texture->h = cinfo.output_height; GRRLIB_SetHandle( my_texture, 0, 0 ); GRRLIB_FlushTex( my_texture ); return my_texture; }
Re: JPEG issue February 07, 2010 02:11AM | Registered: 15 years ago Posts: 98 |
Re: JPEG issue February 08, 2010 05:28PM | Registered: 16 years ago Posts: 175 |
I did the changes in GRRLIB in revision 313.Quote
Aruskano
@Crayon: Add this to the SVN? Since grayscale aren't being displayed correctly I don't think anyone would get mad if GRRLIB forces RGB.