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

Feature request: output to jpg file format #109

Closed
akvaran opened this issue Feb 17, 2024 · 8 comments · Fixed by #116
Closed

Feature request: output to jpg file format #109

akvaran opened this issue Feb 17, 2024 · 8 comments · Fixed by #116

Comments

@akvaran
Copy link

akvaran commented Feb 17, 2024

Hi there! This is a great add on, thanks for build and maintenance. I’m trying to use an inkplate in lieu of a kindle, which only accepts jpg file format. Any chance you could build option to change image output to jpg? Also, is there a way to specify a full URL for the image rather than a port? (Inkplate programming via Ardunio IDE seems to only want an address ending in .jpg rather than an open port). Thanks heaps!

@sibbl
Copy link
Owner

sibbl commented Feb 19, 2024

Hi, allowing an output type jpeg sounds like a good idea, I'll keep that on the list!

I'm not sure about including the file extension in the path, however. It sounds like an easy way the library took to detect the file type - so it's more an active decision on their side which we shouldn't fix on our side.

If I'm not mistaken, it should be possible for you to work with Image::drawPngFromWeb after including the ImagePNG.h, see their code: https://github.com/SolderedElectronics/Inkplate-Arduino-library/blob/aba019c9d2e67bc7e4afb9862be97cf22bd4b430/src/include/ImagePNG.cpp#L208

Maybe this also already solves your specific case?

@LaTrappe
Copy link

Hi Sibbl.
Just discovered your screensaver. Its exactly what i was looking for as I did collect an old Kodak digital photo frame from the 2nd hand store. Unfortunately it would only accept JPG's so I would be highly interested in this feature request as well. Many thanks in advance!

@nbarrientos
Copy link
Contributor

+1

@LaTrappe
Copy link

LaTrappe commented Mar 15, 2024

I adapted the code so its exporting to JPG. Does what it needs to do, although this is not the most pretty solution. See my fork

@sibbl
Copy link
Owner

sibbl commented Mar 15, 2024

@LaTrappe thanks for that reference! Do you think you'd find the time to make the file extension configurable? I think a lot of people would be interested in such a pull request 👍 I currently unfortunately don't find the time myself, but would be happy to review it and support you.

@nbarrientos
Copy link
Contributor

Yeah, @LaTrappe, it'd be lovely if you could submit your patch making the file format switchable via a config option (environment variable) ❤️

@LaTrappe
Copy link

LaTrappe commented Mar 15, 2024

@LaTrappe thanks for that reference! Do you think you'd find the time to make the file extension configurable? I think a lot of people would be interested in such a pull request 👍 I currently unfortunately don't find the time myself, but would be happy to review it and support you.

Im afraid not, I`m not a software developer. Just a script kiddy. See this as a proof of concept.

@nbarrientos
Copy link
Contributor

MR available for discussion.

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

Successfully merging a pull request may close this issue.

4 participants