New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export in JPG #635

Closed
deimosfr opened this Issue Sep 30, 2018 · 17 comments

Comments

Projects
None yet
6 participants
@deimosfr

deimosfr commented Sep 30, 2018

ISSUE TYPE

  • Feature Request

GEEQIE VERSION

Geeqie 1.4

OS / DISTRIBUTION

Arch Linux

SUMMARY

geeqie is doing a wonderful work, thanks for that. I'd like to get the possibility to export in jpg format the rendered images from geeqie. I tried to reproduce without success the rendered result with other tools. That's why I think an export feature would be very useful. May be you have a solution to batch same result in jpg?!

Thanks

@caclark

This comment has been minimized.

Show comment
Hide comment
@caclark

caclark Oct 1, 2018

Collaborator

Are you referring to the export of jpegs from raw images?
If so, tools such as exiftool can extract the embedded jpegs.

Collaborator

caclark commented Oct 1, 2018

Are you referring to the export of jpegs from raw images?
If so, tools such as exiftool can extract the embedded jpegs.

@deimosfr

This comment has been minimized.

Show comment
Hide comment
@deimosfr

deimosfr Oct 1, 2018

Ok, let me rephrase: I really love the way geeqie show images. I would like to be able to make an export into JPG. The JPG should have the same colors managements than geeqie show in RAW format.

deimosfr commented Oct 1, 2018

Ok, let me rephrase: I really love the way geeqie show images. I would like to be able to make an export into JPG. The JPG should have the same colors managements than geeqie show in RAW format.

@caclark

This comment has been minimized.

Show comment
Hide comment
@caclark

caclark Oct 3, 2018

Collaborator

When Geeqie displays a raw image, it displays the jpeg embedded in the file - not the raw data.
The color management is done by the library lcms.

If you would like to store a jpg with color corrections, it may be best to do that outside Geeqie.
Maybe the process would be:

  1. extract the jpg from the raw file.
  2. use jpgicc to apply the render intent.

It is quite straightforward to create a shell script which will do that.
You may create a Geeqie plugin that could call that script from a Geeqie menu, and thus create the color-corrected jpg from the image you are currently viewing.

If you are unsure how to create the plugin, please let me know.

Collaborator

caclark commented Oct 3, 2018

When Geeqie displays a raw image, it displays the jpeg embedded in the file - not the raw data.
The color management is done by the library lcms.

If you would like to store a jpg with color corrections, it may be best to do that outside Geeqie.
Maybe the process would be:

  1. extract the jpg from the raw file.
  2. use jpgicc to apply the render intent.

It is quite straightforward to create a shell script which will do that.
You may create a Geeqie plugin that could call that script from a Geeqie menu, and thus create the color-corrected jpg from the image you are currently viewing.

If you are unsure how to create the plugin, please let me know.

@d-e-s-o

This comment has been minimized.

Show comment
Hide comment
@d-e-s-o

d-e-s-o Oct 6, 2018

Contributor

I really love the way geeqie show images. I would like to be able to make an export into JPG.

Heh, I felt exactly the same way. I wrote a patch that allows you to export "what you see" to PNG (I was only interested in loss-less; though if I remember correctly exporting to JPG should just be a one line change in this patch): d-e-s-o@97093c9

Perhaps it helps.

Contributor

d-e-s-o commented Oct 6, 2018

I really love the way geeqie show images. I would like to be able to make an export into JPG.

Heh, I felt exactly the same way. I wrote a patch that allows you to export "what you see" to PNG (I was only interested in loss-less; though if I remember correctly exporting to JPG should just be a one line change in this patch): d-e-s-o@97093c9

Perhaps it helps.

@deimosfr

This comment has been minimized.

Show comment
Hide comment
@deimosfr

deimosfr Oct 7, 2018

Hi @d-e-s-o thanks for the proposal. I tried to run it and images can't be shown now. Is your patch finished? By the way, I don't find how to export to png. Thanks in advance

deimosfr commented Oct 7, 2018

Hi @d-e-s-o thanks for the proposal. I tried to run it and images can't be shown now. Is your patch finished? By the way, I don't find how to export to png. Thanks in advance

@deimosfr

This comment has been minimized.

Show comment
Hide comment
@deimosfr

deimosfr Oct 7, 2018

@caclark it's not so simple to get the same results than what geeqie is doing after several tries. I really think exporting in most common format would be a great + for geeqie

deimosfr commented Oct 7, 2018

@caclark it's not so simple to get the same results than what geeqie is doing after several tries. I really think exporting in most common format would be a great + for geeqie

@tomaszg7

This comment has been minimized.

Show comment
Hide comment
@tomaszg7

tomaszg7 Oct 7, 2018

Contributor

The patch might make sense if you would be able to do some rudimentary changes to the image in Geeqie (like cropping, resizing or contrast/brightness). Without it it hardly makes sense, as all Geeqie is doing is displaying the image in correct color profile. Only reasonable way to preserve that would be to make a photo of the screen ;) Maybe it is the other program which you use to display images is the one which should be fixed?

If you're really speaking about RAW images, then Geeqie is NOT displaying them at all. As @caclark already explained, it is only displaying preview jpg inside the raw file. If all you want is that, just use something like
find *.cr2 | parallel 'exiftool -b -PreviewImage -w _.jpg {} ; exiftool -tagsfromfile {} -all:all -overwrite_original {.}_.jpg'

Contributor

tomaszg7 commented Oct 7, 2018

The patch might make sense if you would be able to do some rudimentary changes to the image in Geeqie (like cropping, resizing or contrast/brightness). Without it it hardly makes sense, as all Geeqie is doing is displaying the image in correct color profile. Only reasonable way to preserve that would be to make a photo of the screen ;) Maybe it is the other program which you use to display images is the one which should be fixed?

If you're really speaking about RAW images, then Geeqie is NOT displaying them at all. As @caclark already explained, it is only displaying preview jpg inside the raw file. If all you want is that, just use something like
find *.cr2 | parallel 'exiftool -b -PreviewImage -w _.jpg {} ; exiftool -tagsfromfile {} -all:all -overwrite_original {.}_.jpg'

@d-e-s-o

This comment has been minimized.

Show comment
Hide comment
@d-e-s-o

d-e-s-o Oct 7, 2018

Contributor

Hi @d-e-s-o thanks for the proposal. I tried to run it and images can't be shown now. Is your patch finished? By the way, I don't find how to export to png. Thanks in advance

The patch is finished in the sense that it does what it is supposed to do for me and that I am not working on it anymore. It is not ready to be upstreamed, though.

With the patch applied, you should see a new item "Save as png" in the context many appearing when you right click an image. When you select it the png will be saved as .png in the current image's folder.

Contributor

d-e-s-o commented Oct 7, 2018

Hi @d-e-s-o thanks for the proposal. I tried to run it and images can't be shown now. Is your patch finished? By the way, I don't find how to export to png. Thanks in advance

The patch is finished in the sense that it does what it is supposed to do for me and that I am not working on it anymore. It is not ready to be upstreamed, though.

With the patch applied, you should see a new item "Save as png" in the context many appearing when you right click an image. When you select it the png will be saved as .png in the current image's folder.

@caclark

This comment has been minimized.

Show comment
Hide comment
@caclark

caclark Oct 7, 2018

Collaborator

The process used in the patch by d-e-s-o is that the embedded jpeg is extracted from the raw file and put into a pixbuf, then the contents of the pixbuf converted back to a jpeg - which should be redundant.

If you extract the embedded jpeg from a raw file, (and optionally use jpgicc to apply a render intent) and save the resulting image, it should be identical to that displayed in Geeqie by clicking on the raw file. If that is not so, it really is of interest if someone can produce some samples.

As there is such an interest in this feature, i guess I will get around to implementing it. However, it is very likely that it will be done simply by creating a ready-made plugin that uses external programs (as is done for some other Geeqie features).

Collaborator

caclark commented Oct 7, 2018

The process used in the patch by d-e-s-o is that the embedded jpeg is extracted from the raw file and put into a pixbuf, then the contents of the pixbuf converted back to a jpeg - which should be redundant.

If you extract the embedded jpeg from a raw file, (and optionally use jpgicc to apply a render intent) and save the resulting image, it should be identical to that displayed in Geeqie by clicking on the raw file. If that is not so, it really is of interest if someone can produce some samples.

As there is such an interest in this feature, i guess I will get around to implementing it. However, it is very likely that it will be done simply by creating a ready-made plugin that uses external programs (as is done for some other Geeqie features).

@d-e-s-o

This comment has been minimized.

Show comment
Hide comment
@d-e-s-o

d-e-s-o Oct 7, 2018

Contributor

Yeah, I was operating under the assumption that geeqie displays the raw properly and not just the preview jpeg. I don't want to derail the discussion, but is that planned? It's sort of a bummer that it does not do that (and, in fact, I was unaware that such a jpeg is embedded, given that my camera stores them separately as well).

Contributor

d-e-s-o commented Oct 7, 2018

Yeah, I was operating under the assumption that geeqie displays the raw properly and not just the preview jpeg. I don't want to derail the discussion, but is that planned? It's sort of a bummer that it does not do that (and, in fact, I was unaware that such a jpeg is embedded, given that my camera stores them separately as well).

@tomaszg7

This comment has been minimized.

Show comment
Hide comment
@tomaszg7

tomaszg7 Oct 7, 2018

Contributor

(and, in fact, I was unaware that such a jpeg is embedded, given that my camera stores them separately as well)

Yeah, those RAW+JPG settings often make no sense :) Some cameras include half resolution jpg, some full resolution and usually there is no way to customize it.

I don't want to derail the discussion, but is that planned?

That's probably not very difficult, but that should be configurable as proper RAW decoding is very complex process and would take quite a time.

Contributor

tomaszg7 commented Oct 7, 2018

(and, in fact, I was unaware that such a jpeg is embedded, given that my camera stores them separately as well)

Yeah, those RAW+JPG settings often make no sense :) Some cameras include half resolution jpg, some full resolution and usually there is no way to customize it.

I don't want to derail the discussion, but is that planned?

That's probably not very difficult, but that should be configurable as proper RAW decoding is very complex process and would take quite a time.

@caclark

This comment has been minimized.

Show comment
Hide comment
@caclark

caclark Oct 7, 2018

Collaborator

The patch might make sense if you would be able to do some rudimentary changes to the image in Geeqie (like cropping, resizing or contrast/brightness). Without it it hardly makes sense, as all Geeqie is doing is

I occasionally extract the jpeg from a raw file when I want to email a photo - so I have a script that extracts the jpeg and re-sizes it down to a size the mail system will accept.
I guess it is reasonable to accept that some users will find a use, in some way or other, for extracted jpegs.

Collaborator

caclark commented Oct 7, 2018

The patch might make sense if you would be able to do some rudimentary changes to the image in Geeqie (like cropping, resizing or contrast/brightness). Without it it hardly makes sense, as all Geeqie is doing is

I occasionally extract the jpeg from a raw file when I want to email a photo - so I have a script that extracts the jpeg and re-sizes it down to a size the mail system will accept.
I guess it is reasonable to accept that some users will find a use, in some way or other, for extracted jpegs.

@tomaszg7

This comment has been minimized.

Show comment
Hide comment
@tomaszg7

tomaszg7 Oct 7, 2018

Contributor

I occasionally extract the jpeg from a raw file when I want to email a photo - so I have a script that extracts the jpeg and re-sizes it down to a size the mail system will accept.
I guess it is reasonable to accept that some users will find a use, in some way or other, for extracted jpegs.

Obviously it is useful. I also have some scripts around that issue :) I was not speaking about extracting jpgs but about dumping geeqie decoded pixbuf.

Contributor

tomaszg7 commented Oct 7, 2018

I occasionally extract the jpeg from a raw file when I want to email a photo - so I have a script that extracts the jpeg and re-sizes it down to a size the mail system will accept.
I guess it is reasonable to accept that some users will find a use, in some way or other, for extracted jpegs.

Obviously it is useful. I also have some scripts around that issue :) I was not speaking about extracting jpgs but about dumping geeqie decoded pixbuf.

@xsdg

This comment has been minimized.

Show comment
Hide comment
@xsdg

xsdg Oct 7, 2018

Contributor

Yeah, I was operating under the assumption that geeqie displays the raw properly and not just the preview jpeg. I don't want to derail the discussion, but is that planned? It's sort of a bummer that it does not do that (and, in fact, I was unaware that such a jpeg is embedded, given that my camera stores them separately as well).

geeqie is not a RAW processor. There are multiple entire programs dedicated to processing RAW files. And there is no universal set of "default settings" that will work to get a reasonable baseline for any given RAW image. My own sense is that geeqie should continue to focus on what it's good at (displaying simple image data very quickly, and allowing people to sort and organize those files quickly and effectively), and leave the other stuff for programs like darktable and RawTherapee and UFRaw that are focused on RAW processing.

Contributor

xsdg commented Oct 7, 2018

Yeah, I was operating under the assumption that geeqie displays the raw properly and not just the preview jpeg. I don't want to derail the discussion, but is that planned? It's sort of a bummer that it does not do that (and, in fact, I was unaware that such a jpeg is embedded, given that my camera stores them separately as well).

geeqie is not a RAW processor. There are multiple entire programs dedicated to processing RAW files. And there is no universal set of "default settings" that will work to get a reasonable baseline for any given RAW image. My own sense is that geeqie should continue to focus on what it's good at (displaying simple image data very quickly, and allowing people to sort and organize those files quickly and effectively), and leave the other stuff for programs like darktable and RawTherapee and UFRaw that are focused on RAW processing.

@junkyardsparkle

This comment has been minimized.

Show comment
Hide comment
@junkyardsparkle

junkyardsparkle Oct 8, 2018

Have to agree with @xsdg, producing output from RAW processing that resembles what the user expects (the camera generated JPEG) is non-trivial to say the least. It's common even for software like darktable, which is a RAW editor, to have new users complaining that the default rendering of their files is "wrong" or "broken", because in their minds the preview is what the RAW file "looks like". Best to focus on integration with existing processing software IMHO. Displaying the embedded preview is "the right thing" for a fast image browser.

That said, it could be made more transparent to the user that this is what's going on, and including an exiftool script (or similar) to pop out a preview into a JPEG file sounds like a neat feature (keeping in mind that sometimes these embedded images are very highly compressed and not great quality)... my two cents. 😁

junkyardsparkle commented Oct 8, 2018

Have to agree with @xsdg, producing output from RAW processing that resembles what the user expects (the camera generated JPEG) is non-trivial to say the least. It's common even for software like darktable, which is a RAW editor, to have new users complaining that the default rendering of their files is "wrong" or "broken", because in their minds the preview is what the RAW file "looks like". Best to focus on integration with existing processing software IMHO. Displaying the embedded preview is "the right thing" for a fast image browser.

That said, it could be made more transparent to the user that this is what's going on, and including an exiftool script (or similar) to pop out a preview into a JPEG file sounds like a neat feature (keeping in mind that sometimes these embedded images are very highly compressed and not great quality)... my two cents. 😁

@caclark

This comment has been minimized.

Show comment
Hide comment
@caclark

caclark Oct 11, 2018

Collaborator

The attached .diff is some kind of solution to the problem.
I didn't commit it, as the implementation is probably not to eveyone's taste.
export-image-1.diff.gz

Collaborator

caclark commented Oct 11, 2018

The attached .diff is some kind of solution to the problem.
I didn't commit it, as the implementation is probably not to eveyone's taste.
export-image-1.diff.gz

@caclark

This comment has been minimized.

Show comment
Hide comment

@caclark caclark closed this Oct 14, 2018

mowgli pushed a commit that referenced this issue Oct 19, 2018

Fix #635: Export in JPG
#635

Implemented via plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment