Lossless JPG editing

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
NTOS

Lossless JPG editing

Post by NTOS » Tue Oct 09, 2007 2:30 pm

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 :idea:

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 ? :?:

User avatar
mk.2
Posts: 23
Joined: Sun Aug 28, 2005 10:05 pm
Location: Perth, Australia

JPEGCrop

Post by mk.2 » Mon Nov 05, 2007 9:05 am

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).

User avatar
xnview
Author of XnView
Posts: 32750
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: JPEGCrop

Post by xnview » Mon Nov 05, 2007 10:21 am

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!
Pierre.

User avatar
Anika
Posts: 85
Joined: Wed Jul 28, 2004 12:18 pm

Post by Anika » Mon Nov 05, 2007 10:59 am

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
XnView 2.04, 2.13 Windows 2000 SP4 and Windows XP SP3 and Windows 7 64bit

User avatar
mk.2
Posts: 23
Joined: Sun Aug 28, 2005 10:05 pm
Location: Perth, Australia

Re: JPEGCrop

Post by mk.2 » Mon Nov 05, 2007 6:15 pm

xnview wrote:You have lossless cropping in xnview!
:shock:

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.

User avatar
helmut
Posts: 8192
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut » Mon Nov 05, 2007 8:56 pm

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.

User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

Where is the truth ?

Post by Clo » Mon Nov 05, 2007 9:07 pm

—> 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.

:mrgreen: G.
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice

User avatar
helmut
Posts: 8192
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Where is the truth ?

Post by helmut » Mon Nov 05, 2007 9:27 pm

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.

simon
Posts: 35
Joined: Wed Aug 23, 2006 4:51 pm

Post by simon » Mon Nov 19, 2007 6:16 pm

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

Post Reply