Page 1 of 1
Lossless JPG editing
Posted: Tue Oct 09, 2007 2:30 pm
by NTOS
Well, XNVIEW already supports mirroring and rotating in 90 degree steps
At this occasion, the image size gets cropped to an integer factor of 8 in both dimensions at right and bottom side
There should be a possibility to perform some further edits this way: cropping (in 8 steps again) and censoring (removing 8x8 blocks or replacing them with new blocks).
Is there something around to do such edits ? Or could it be implemented into XNVIEW ?

JPEGCrop
Posted: Mon Nov 05, 2007 9:05 am
by mk.2
You could give
JPEGCrop a try.
JPEGCrop is a small stanalone program (~450 kb) which can losslessly rotate & crop picture in a factor of 8 pixels. However, with some pictures, it uses a factor of 16 pixels (heard that it has something to do with 'MCU boundaries' of each picture file but I don't actually know what it is).
Re: JPEGCrop
Posted: Mon Nov 05, 2007 10:21 am
by xnview
mk.2 wrote:You could give
JPEGCrop a try.
JPEGCrop is a small stanalone program (~450 kb) which can losslessly rotate & crop picture in a factor of 8 pixels. However, with some pictures, it uses a factor of 16 pixels (heard that it has something to do with 'MCU boundaries' of each picture file but I don't actually know what it is).
You have lossless cropping in xnview!
Posted: Mon Nov 05, 2007 10:59 am
by Anika
For "censoring" I use BetterJPEG. It also has outward cropping for lossless adding borders and cropping independent of the 8px limitation. It recompresses only the changed blocks. I found no other program that can do this.
I suggested this already in
http://newsgroup.xnview.com/viewtopic.php?t=1591
Greetings, Anika
Re: JPEGCrop
Posted: Mon Nov 05, 2007 6:15 pm
by mk.2
xnview wrote:You have lossless cropping in xnview!
I have only been using XnView as picture browser/viewer.
So.. err... I guess I should have started to explore other features XnView can do.
Posted: Mon Nov 05, 2007 8:56 pm
by helmut
The lossless JPG functions are available in Tools > JPGLossless transformations.
Important note:
Lossless transformations affects the file directly, make sure that you have a copy/backup before applying the function. Cropping means cutting off parts of the existing image data - so please take care.
Where is the truth ?
Posted: Mon Nov 05, 2007 9:07 pm
by Clo
—> helmut
• Hi !
- Hm…
Pierre tells that's lossless, and you say it's lossy, so where is the truth ?
- Seeing above that
A***e is using a specialized third-party tool, I would tend to trust you, though…
To reach an agreement is desirable, IMHO.

G.
Claude
Clo
Re: Where is the truth ?
Posted: Mon Nov 05, 2007 9:27 pm
by helmut
Clo wrote:- Hm… Pierre tells that's lossless, and you say it's lossy, so where is the truth ?
Both Pierre and I tell the truth:
In respect of saving the image data, the cropping operation available via "Tools > JPG lossless transformations > Crop" is lossless, there's no lossy re-compressing of image data. But cropping means that you cut off part of the image (data), which is *never* lossless (because you loose the part that you have decided to cut off).
I think you understand the difference.
Posted: Mon Nov 19, 2007 6:16 pm
by simon
Hi !
Xnview has clealry become a great JPEG image processor, with the ability to save in JPEG with many options (including disabling color subsampling) and to perform lossless rotation and cropping. Actually it is just missing an ultimate possibility, namely "censoring", that is very usefull to copy a group of pixels (in a fact a group of MCU) through a selection tool (e.g a simple rectangle selection, but could be a lasso as well, but probably more difficult to implement) to an image editor (photoshop or other) to perform some changes such as removing of a local artifacts, and then copy back to the original image, WITHOUT recompressing it (only the MCU involving some changes are recompressed). To my knowledge, this possibility is actually offered only by BetterJPEG, that is a program that is only aimed at manipulating JPEG images. So, it would be VERY VERY GREAT if this ultimate JPEG manipulation could be implemented in XnView. Anyway, thanks a lot for all the work already done.
Simon