- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
In short, is it supported in UIC or IPP?
I need a lossless rotation of JPEG image.
I need a lossless rotation of JPEG image.
Link copiado
8 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I asked this question a while back, and the answer was no.
I use my own JpegTrans.dll, compiled from IJG, however I not sure if it can handle anything outside baseline jpeg.
See:
ipp-samples\image-codecs\ijg\samples\utils\jpegtran.c
I use my own JpegTrans.dll, compiled from IJG, however I not sure if it can handle anything outside baseline jpeg.
See:
ipp-samples\image-codecs\ijg\samples\utils\jpegtran.c
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
What do you call as lossless JPEG rotation? If that is technique used in IJG library than it is not mathematically lossless and is not necessary faster then just full decode and rotate.
What widely called as JPEG lossless rotate is partial decoding up to final up-sampling and color conversion steps, that is:
1. huffman decode of DCT coefficients
2. dequantization
3. inverse DCT transform (which brings data from frequency domain back to time domain and produceimage pixels)
- here is the point where it is possible to rotatepixel data before the final step, which is up-sampling (if needed) and color conversion (if needed)
First, the only mathematically lossless operation here is huffman decoding.
Second, performance of IPP implementation of up-sampling and color-conversion functions reduce difference in time required to that "lossless rotate operation" and just naive full decoding and rotate.
Regards,
Vladimir
What widely called as JPEG lossless rotate is partial decoding up to final up-sampling and color conversion steps, that is:
1. huffman decode of DCT coefficients
2. dequantization
3. inverse DCT transform (which brings data from frequency domain back to time domain and produceimage pixels)
- here is the point where it is possible to rotatepixel data before the final step, which is up-sampling (if needed) and color conversion (if needed)
First, the only mathematically lossless operation here is huffman decoding.
Second, performance of IPP implementation of up-sampling and color-conversion functions reduce difference in time required to that "lossless rotate operation" and just naive full decoding and rotate.
Regards,
Vladimir
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Vladimir,
I should perhaps said "reversible" instead of "lossless" and clarified that I mean 90, 180 and 270 rotation and flipping.
As far as I know JPEGTRAN does not perform dequantization and IDCT, but instead transforms MCU blocks, AC coefficient matrices, and changes chroma subsampling orientation.
Lossless crop is also possible as long as you crop along MCU boundaries.
Finally, chrominance channels can be discarded for simple and fast grayscale conversion without recompression.
You might want to read through this carefully:
http://www.impulseadventure.com/photo/lossless-rotation.html
Full decompression and rotation is fast enough for display, but I want to be able to save the rotated file without the loss of quality associated with full JPEG recompression.
I should perhaps said "reversible" instead of "lossless" and clarified that I mean 90, 180 and 270 rotation and flipping.
As far as I know JPEGTRAN does not perform dequantization and IDCT, but instead transforms MCU blocks, AC coefficient matrices, and changes chroma subsampling orientation.
Lossless crop is also possible as long as you crop along MCU boundaries.
Finally, chrominance channels can be discarded for simple and fast grayscale conversion without recompression.
You might want to read through this carefully:
http://www.impulseadventure.com/photo/lossless-rotation.html
Full decompression and rotation is fast enough for display, but I want to be able to save the rotated file without the loss of quality associated with full JPEG recompression.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hm, do you mean jpegtran do all these reversible flipping in frequency domain?
Vladimir
Vladimir
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Sure, that's the whole point.
If you don't believe me, try it and compare results of conventional rotation with recompression and reversible rotation. There are a lot of programs supporting reversible transforms nowadays.
If you don't believe me, try it and compare results of conventional rotation with recompression and reversible rotation. There are a lot of programs supporting reversible transforms nowadays.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Perhaps you should specify that you want rotation angles be x90 degrees. Though it could be lossless for 45 degree increments too with a little more work. You can not do it for an abitrary angle.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
You are wrong in this statement. Lossless jpeg rotation means only huffman decoding, DCT rotation/mirror, huffman encoding.
To put it simply, no new jpeg artifacts are introduced with lossless rotation.
You can repeat lossless rotation infinitely without destroying the image.
The only issue are the right and bottom borders, because they are not on an 8x8 boundary.
If the original image is modulo 8x8, rotation/mirror is purely lossless.
To put it simply, no new jpeg artifacts are introduced with lossless rotation.
You can repeat lossless rotation infinitely without destroying the image.
The only issue are the right and bottom borders, because they are not on an 8x8 boundary.
If the original image is modulo 8x8, rotation/mirror is purely lossless.
Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora