Page 1 of 1

How do I do a lossless jpg crop?

Posted: Thu Apr 28, 2011 7:16 am
by iycgtptyarvg
I have been using FastStone viewer for some years now, and that application has a feature whereby you can cut/crop a piece out of your photos and save them. The thing is, it is doing it losslessly, even though it's a jpg. So, I could cut/crop a picture I've taken multiple times without losing any quality.

How can I do this with XnView? I've been searching the forum, but couldn't find any good info on it.

Re: How do I do a lossless jpg crop?

Posted: Thu Apr 28, 2011 9:11 am
by xnview
You have Lossless operations>Crop

Re: How do I do a lossless jpg crop?

Posted: Thu Apr 28, 2011 9:24 pm
by iycgtptyarvg
#OUCH#, I just lost a picture!!! There is no undo, and it immediately overwrites the file on the hard-disk!!! :evil: :x :evil:

Please fix this terrible bug before others also lose their photographs!
I'm using v1.97.8 and can reproduce this bug consistently.

Do you need my ini file to replicate the bug? Let me know.

Re: How do I do a lossless jpg crop?

Posted: Thu Apr 28, 2011 11:53 pm
by helmut
Behaviour of JPG losssless crop is tricky and data can be lost too easily. In topic Auto-Backup for JPGlossless cropping an improvement has been suggested.

Re: How do I do a lossless jpg crop?

Posted: Thu Apr 28, 2011 11:56 pm
by JohnFredC
Hmmm... sorry to hear that. :(

But, if the crop was saved to a new file, then perhaps it couldn't be a "lossless" transformation (since the file would have to be recompressed upon saving to the new file)?

Certainly lossless rotations do occur "within" the original file... it is logical that so also would the lossless crop occur "within" the original file.

So, make a copy first!

Re: How do I do a lossless jpg crop?

Posted: Fri Apr 29, 2011 12:00 am
by XnTriq
Did you change the following setting?
  • Tools » Options... » General » File Operations » For lossless operation, make a backup
AFAIK, it's activated by default.
helmut ([url=http://newsgroup.xnview.com/viewtopic.php?p=82322#p82322]Poor Man's Version Control[/url]) wrote:From my point of view the version control should be much less present in dialogs and be more a backup system than a version control. Especially in some situations like lossless crop a backup can be very important and essential to prevent the user from image loss.
<!-- Edit: Too little, too late :P //-->

Re: How do I do a lossless jpg crop?

Posted: Fri Apr 29, 2011 7:36 am
by iycgtptyarvg
XnTriq wrote:Did you change the following setting?
  • Tools » Options... » General » File Operations » For lossless operation, make a backup
AFAIK, it's activated by default.
I did not know about this setting, and it was off for me :(

But really, why on Earth is there no undo and does it save immediately? This is horrible behaviour that is going to bring grown men to tears. Luckily I still had a backup on my camera, or I would have lost a couple of my irreplaceable photos.

Please, please, pretty please with sugar on top FIX THIS!!!

Re: How do I do a lossless jpg crop?

Posted: Fri Apr 29, 2011 2:15 pm
by xnview
iycgtptyarvg wrote:I did not know about this setting, and it was off for me :(
:( yes not by default... But you have a message that lossless operations works on original file!

Re: How do I do a lossless jpg crop?

Posted: Sat Apr 30, 2011 10:12 am
by iycgtptyarvg
But WHY do it like this? Who could possibly benefit from the risk of losing your photo?
Is there any logical reason why you can't UNDO/REDO the operation like everything else in XnView?

Re: How do I do a lossless jpg crop?

Posted: Sat Jan 21, 2023 6:21 pm
by igel
Ressurecting an old thread. :)
I'm a long-time user of XnViewMP which is my default image viewer. However for processing images I'm using mostly GIMP.
Long story cut short - I'd like to make a lossless crop of a JPG with XnView.
Under Tools: JPEG lossless operations there are only options for "Rotate" and "Flip". The option "Crop" is grayed out.
It's grayed out in both XnViewMP and the latest XnView I did download today for testing.
Thanks in advance for any suggestion.

Re: How do I do a lossless jpg crop?

Posted: Sat Jan 21, 2023 7:45 pm
by XnTriq
igel wrote: Sat Jan 21, 2023 6:21 pmUnder Tools: JPEG lossless operations there are only options for "Rotate" and "Flip". The option "Crop" is grayed out.
Does one of the following solutions work for you, igel?
helmut wrote: Tue Aug 30, 2022 7:39 pmFor JPEG lossless cropping please make a selection first. Then, "Tools > JPG Lossless operations > Crop" will be available.
bitz4 wrote: Thu May 23, 2013 10:01 amI open a picture in view, make a selection, on the toolbar I have the 'JPEG lossless transformations' drop-down menu present I click the arrow, and the crop option is the only one greyed out. I have to keep the selection (otherwise it won't work), zoom in or out, then access the menu and only then the crop option becomes available.

Re: How do I do a lossless jpg crop?

Posted: Sat Jan 21, 2023 8:01 pm
by igel
Many thanks!

I should learn to use the software before asking for help. :)
I didn't make the selection first. With the selection done the option isn't grayed out and lossless croping works fine.

Re: How do I do a lossless jpg crop?

Posted: Sun Jan 22, 2023 12:00 am
by XnTriq
igel wrote: Sat Jan 21, 2023 8:01 pmI didn't make the selection first. With the selection done the option isn't grayed out and lossless croping works fine.
Thanks for reporting back, igel :-)