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

Base64 copy/export #557

Open
LespiletteMaxime opened this issue Mar 8, 2023 · 6 comments · May be fixed by #609
Open

Base64 copy/export #557

LespiletteMaxime opened this issue Mar 8, 2023 · 6 comments · May be fixed by #609
Labels
enhancement New feature or request

Comments

@LespiletteMaxime
Copy link

Hello,

It would be really useful to be able to copy or export a capture in base64.

Thanks

@LespiletteMaxime LespiletteMaxime added the enhancement New feature or request label Mar 8, 2023
@Photon89 Photon89 linked a pull request Aug 11, 2023 that will close this issue
@Photon89
Copy link
Member

@LespiletteMaxime I opened a PR implementing this feature (linked above), feel free to test!

@DarthGandalf
Copy link
Member

@LespiletteMaxime

Base64 is not an image format. Base64 encodes a stream of bytes to stream of text. These bytes could be whatever: PNG, JPG, PDF, SVG even.

What exactly does this export mean?

@LespiletteMaxime
Copy link
Author

LespiletteMaxime commented Sep 19, 2023

@DarthGandalf, I know it's not an image format, but I can export in pdf with shutter who is not an image format too, I give you a use case for exemple, when I write a document in markdown with many screenshots it can be convenient to include the screenshot with base64 string instead of dealing with X .jpg files who will have to be linked in some way with the document.

@LespiletteMaxime LespiletteMaxime linked a pull request Sep 19, 2023 that will close this issue
@DarthGandalf
Copy link
Member

DarthGandalf commented Sep 19, 2023

pdf is a defined file format, which you can open with common pdf-reading tools to see the image on your screen. Even though technically the format supports more than images.

base64 is just a way to change sequence of bytes to another sequence of bytes, you can't take an arbitrary sequence of bytes and meaningfully show it on screen as an image.

be convenient to include the screenshot with base64 string instead of dealing with X .jpg

Ok, it looks like you want not a "base64", but specifically jpg encoded as base64, and jpg is an actual image format. No idea though how you can include base64 (even with jpg inside) in markdown to preserve its imageness. Whoever looks at this markdown page would need to know to decode base64 and then decode jpg from it?

@LespiletteMaxime
Copy link
Author

@DarthGandalf, Thanks for your quick reply, I use obsidian, which integrates base64 images perfectly. In fact, my current workflow is to take a screenshot, save the capture as a .jpg or .png, get the base64 of it and then delete the image. The ability to directly obtain the base64 from a capture in shutter would be a real time saver for me. I fully understand that this may seem like an unnecessary option for many people, but I haven't found any image capture software that allows me to do this.

@LespiletteMaxime
Copy link
Author

Demo of base64 in obsidian demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants