giandonatoinverso / PHP-Dynamic-Qr-code

PHP Dynamic Qr code is a script that allows the generation and saving of dynamic and static QR codes
MIT License
244 stars 73 forks source link

Feature: Download as specific file extension/format #39

Open 0xRenegade opened 1 year ago

0xRenegade commented 1 year ago

Supported formats currently:

<option value="png">PNG</option>
<option value="gif">GIF</option>
<option value="jpeg">JPEG</option>
<option value="jpg">JPG</option>
<option value="svg">SVG</option>
<option value="eps">EPS</option>

Add in ability to download qrcode(s) in a specific file extension/format. Possibly a modal/dropdown menu appears when clicking download button to run a backend function to convert the image type(s) that aren't the same as the chosen format(s)?

giandonatoinverso commented 1 year ago

Yes it is a good feature. If implemented, it would allow to generate qr code always and only in svg, for example, and to let the user choose, at the time of download, the desired format

0xRenegade commented 1 year ago

https://github.com/free-open-source/php-image-converter/blob/master/src/ImageConverter.php

Found this class script for most of the formats in the list above, which would serve as a good starting point for a new /lib/ addition. Finding stuff for vectors ends up a little more challenging. Such as with another library (https://github.com/meyfa/php-svg) [which only supports raster -> vector conversion] or using inkscape commands [without the worry of mentioned security issues, because our svgs are coming straight from the database/server itself than what the user inputs] (https://stackoverflow.com/a/10400963). If you know a better alternative for svg, and something for EPS I'd love to know it.

giandonatoinverso commented 1 year ago

Hello if the classes / libraries you propose have been adequately tested and if in your opinion you think they can solve the conversion problem then you can proceed with the integration. For svg and eps i don't know php conversion solutions

0xRenegade commented 1 year ago

@giandonatoinverso Would you be interested in marking these issues/Pull Requests as hacktoberfest and hacktoberfest-accepted on PR? Here's some info on it. https://hacktoberfest.com/participation/

giandonatoinverso commented 1 year ago

it looks interesting. Can you do it?

0xRenegade commented 1 year ago

I'm not sure what you mean? For the pull request to count the maintainer needs to mark the PR as "hacktoberfest-accepted" (there's info there at the bottom for maintainers).

If you're asking whether I can finish the PR, yes I can I just haven't yet. Although I'd probably just open a new PR so it's also technically in October, and I've been told by other participants this is okay as long as it's a meaningful contribution to open source.

giandonatoinverso commented 1 year ago

I connected github to the site but it is not clear to me how to put custom labels on the issues with their name.

Andrew-H2O commented 8 months ago

I’d appreciate this feature if it can be added.