Skip to content
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

Add an image caption option #24

Open
phd21 opened this issue Mar 14, 2018 · 5 comments
Open

Add an image caption option #24

phd21 opened this issue Mar 14, 2018 · 5 comments
Assignees

Comments

@phd21
Copy link

phd21 commented Mar 14, 2018

Hi Damir,

I hope you and yours are doing well. I love the new updates and features of Ksnip. It is my default screen capture application.

I read a new post today from new Linux user, and then some other related posts, on the topic of adding a caption to an image like at the bottom or top or perhaps sides, rather than overlaying text on top of an image. The user was changing the canvas size then adding a box at the bottom with text using MS Paint before.
Adding caption to a photo - Linux Mint Forums
https://forums.linuxmint.com/viewtopic.php?f=90&t=265728&p=1443939#p1443939

I found this from ImageMagick
How to add a title to multiple images - ImageMagick
http://www.imagemagick.org/discourse-server/viewtopic.php?t=31452

Do you know of any easy way to do this? Could something like this be incorporated as an option in Ksnip? Is there a QT function for keeping the image dimensions, but increasing the image's canvas size at the bottom or top, (or left or right sides), to allow room for a caption, maybe automatically adding a white box to match the newly added canvas size where the caption's text would go? Perhaps adding some modified ImageMagick command from that link to a caption tool?

Example ImageMagick: The %f is the filename. but you can use another variable or any text with the quotes.
montage -label "%f" Frog_Sitting.jpg -tile 1x1 -geometry +0+0 Frog_Sitting_titled.jpg

Best regards to you and yours,
Phil
[email protected]

@DamirPorobic
Copy link
Member

Hey Phil,

If I understand correctly this extends the image actually, so if you add a caption below the image it adds some space and puts some text in there, but not on the original image?
That is probably doable, but not that simple, you need to provide some option to chose a background color extend the image, increase the paint area to match the new size, add some textbox where the user can type text and so on.

I'll keep this request open and will add the stuff when I come up with something.

@phd21
Copy link
Author

phd21 commented Mar 15, 2018

Hi Damir,

How's it going with you?

If you do not want to alter the original image, then yes it would extend it. Otherwise, you could shrink it a little to put in the caption area. If you use the image width dimensions and fixed caption and text size, that should help.

I was surprised at how well the ImageMagick commands like montage worked, have you tried it. ImageMagick is installed in all editions of Linux Mint as far as I know and in most Linux repos.

Obviously, image captions are very popular and sometimes a necessity with word processing, cataloging, notes, forums, photography, etc... But these options seem to be separate from the image itself. It would be nice to have the ability to incorporate a title, like a visible caption, and or an "exif" tag metadata into the image (or both).

Best regards,
Phil

@phd21
Copy link
Author

phd21 commented Mar 15, 2018

Hi Damir,

I was thinking about this. It would be best to use QT tools because there would be no other dependencies.

But, while you are thinking about that, perhaps there is a simple way to incorporate ImageMagick montage command into Ksnip. If you modify the "save" or "save as" dialog, to enter in the file name, you could have a checkbox for "Add Caption" with an user entry title caption text box, then run the ImageMagick montage command on the image file. Perhaps another option to keep the original image without the caption, or to delete it? or create a new "File" option for Add Caption. What do you think?

Best regards,
Phil

@DamirPorobic DamirPorobic transferred this issue from ksnip/ksnip Nov 4, 2018
@DamirPorobic DamirPorobic self-assigned this Nov 4, 2018
@DamirPorobic DamirPorobic changed the title Feature request - add an image caption option? Add an image caption option? Dec 12, 2018
@DamirPorobic DamirPorobic changed the title Add an image caption option? Add an image caption option Jan 27, 2019
@DamirPorobic
Copy link
Member

Hey Phil, just want to let you know that you can now write stuff outside the screenshot, for example below the Screenshot, like caption and this will be save correctly in the saved image. Might be a workaround for you until this feature is implemented.

@nealmcb
Copy link

nealmcb commented Apr 14, 2022

I want to second the very simple notion of letting the user add an EXIF tag. That is actually all that I want: the ability to quickly take screenshots and add keywords, comments, descriptions, etc. That would help with cataloging them, would give AI categorization schemes a huge leg up, would be easy to program, and would have no impact on the integrity of the pixels at all.

For the other use cases noted here, the user could subsequently pick their own tool of choice which could be either quick or smart about how to take the metadata and attach it visibly to the image, as a caption in a new area outside the screenshot, or overlaid on it or whatever.

I'm no EXIF expert, but offhand, to avoid character set issues, using Exif.Photo.UserComment seems like a good option. Alternatives might be Exif.Image.ImageDescription or Exif.Image.XPTitle. Details at e.g. Exiv2 - Image metadata library and tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants