png2src: add ability to handle any width #713
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
solves #497
tested on these images, for 1bpp and 2bpp:
7x7 pixels:
![smiley_1bpp_7x7](https://private-user-images.githubusercontent.com/50550773/326235473-6b6a28d5-6127-446d-a305-eab1da491f63.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDQxMTcsIm5iZiI6MTcyNDE0MzgxNywicGF0aCI6Ii81MDU1MDc3My8zMjYyMzU0NzMtNmI2YTI4ZDUtNjEyNy00NDZkLWEzMDUtZWFiMWRhNDkxZjYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA4NTAxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThjMzZkYTVkZjZkNGFhN2VjNzYyYWEyZWI4OTUxNmNlYWM5NDEwOWQ1OWM2MWRjMjgwOGNjZTI2MjI1NzQyYjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wKR4lkyIQram9oeBhgq20A3_0QeyZy_2T_-8gY574DY)
![smiley_2bpp_7x7](https://private-user-images.githubusercontent.com/50550773/326235475-69298e4f-6f17-46ce-846b-beba35f51896.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDQxMTcsIm5iZiI6MTcyNDE0MzgxNywicGF0aCI6Ii81MDU1MDc3My8zMjYyMzU0NzUtNjkyOThlNGYtNmYxNy00NmNlLTg0NmItYmViYTM1ZjUxODk2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA4NTAxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmYjEyMDFjNjEyYWY3MDllYjI2M2E1Y2JlMjJkNTA2NDdhMzljYjcyOWFmZjRkNjY3ODIyMTIwNzBkNGVhNjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.t87kDXh0EY1JCDkOhlX9i6Jd4BbSXfNfp36kD8fxkwc)
8x8 pixels:
![smiley_1bpp_8x8](https://private-user-images.githubusercontent.com/50550773/326235474-59b5af65-8c34-4272-a8d4-17476033da9e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDQxMTcsIm5iZiI6MTcyNDE0MzgxNywicGF0aCI6Ii81MDU1MDc3My8zMjYyMzU0NzQtNTliNWFmNjUtOGMzNC00MjcyLWE4ZDQtMTc0NzYwMzNkYTllLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA4NTAxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk2YTkxODFkYjViNjU4Yzg4MmQxYWFmZTQzMmZmNmEyYTQ2MjJiY2RmNmZmYzI3Nzc2Yjc2NWIzNGZkNGJmMTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hL5WoBO5FpzAGpDr-8R0g-zddGgo4yPNCQxbA8IFloI)
![smiley_2bpp_8x8](https://private-user-images.githubusercontent.com/50550773/326235476-a057dae4-47dd-4280-934d-4f68f1c891e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxNDQxMTcsIm5iZiI6MTcyNDE0MzgxNywicGF0aCI6Ii81MDU1MDc3My8zMjYyMzU0NzYtYTA1N2RhZTQtNDdkZC00MjgwLTkzNGQtNGY2OGYxYzg5MWUxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA4NTAxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkZTljNGRjODJmMTgyNGE2MTJjYzcxNzdkZTg3ODc1MjJlOWM3MzIyMzgwMTRjMzYxZTA1YmNjODdkZmE2MzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.i2Q2x-WYwDzhBSSkFKEp8pU49i0VjUAf1iDifayv38E)