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

Converting map png #2

Open
IJmouri opened this issue Feb 28, 2022 · 3 comments
Open

Converting map png #2

IJmouri opened this issue Feb 28, 2022 · 3 comments

Comments

@IJmouri
Copy link

IJmouri commented Feb 28, 2022

Is it possible to use this code for map png image to svg? I have tried this code but there is no output, though in inspect there are svg codes. I wonder why this is happening. Can you please explain?

@cesarmiquel
Copy link
Owner

@IJmouri This code will basically convert each pixel into a square in SVG format with the bg color. It's meant to convert pixel artwork. These images where converted to SVG (and then back to PNG) with the code: https://hypro.tumblr.com/post/13101851805/siguiendo-con-mario-ahora-estuve-jugando-con and https://hypro.tumblr.com/post/81957542288/i-created-these-by-copying-the-pixel-map-images

@IJmouri
Copy link
Author

IJmouri commented May 14, 2022

can i run the php file in browser with the svg image output?

@cesarmiquel
Copy link
Owner

Not sure what you mean. The script needs to run on a server with PHP (for example Apache/NGinx + php_fpm) and you can view the output on the browser. You would probably need to modify it so that you provide the PNG image as a $_GET parameter. Right now its designed for command line.

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

No branches or pull requests

2 participants