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

Integrating BPMX Model Files into Private PNG Chunks to Display Previews #19

Open
SavAct opened this issue Apr 13, 2024 · 4 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@SavAct
Copy link

SavAct commented Apr 13, 2024

I appreciate that you are converting the model files directly into your own format (BPMX). Since you've gone this far, how about storing this file format in a private PNG chunk? This means the file would be hidden within a PNG image.

There are companies that handle it this way in order to display a preview image without compatibility issues across all web browsers and operating systems without the need to install any software/plugins. This could be done with a few lines of code; see: https://github.com/SavAct/pnghide

@noname0310
Copy link
Owner

Cool idea, I've seen something like that at Koikatsu.

But what exactly are the compatibility issues and is this a feature you really need?

I'm concerned about the increase in bundle size due to the addition of these features

@SavAct
Copy link
Author

SavAct commented Apr 13, 2024

There are benefits to being able to immediately recognize which model is depicted in a preview image:

  1. When someone shares a PNG file online, and I can directly see what the content will be, I am more likely to download it compared to an unfamiliar file format.

  2. Typically, modern operating systems already display a preview of PNG files. If you have many models stored in a folder on your computer, it would be more convenient to see a preview of each model directly in order to differentiate them without needing to load each of them into a program.

Therefore, in my opinion, this file format within a png would likely achieve higher user acceptance and spread more quickly in forums and similar venues. However, the increased bundle size is indeed a significant point of criticism:
I have used "pngjs," which should already include the "crc32" library. Currently, pngjs has a transpiled size of 4.23 KB.

@SavAct
Copy link
Author

SavAct commented Apr 13, 2024

But what exactly are the compatibility issues and is this a feature you really need?

Sorry, "compatibility issues" was an inaccurate ai translation.

@noname0310
Copy link
Owner

4KB is huge. The bpmx format is a format I made for fast load, so if there's a big overhead here, there's no reason to use it

@noname0310 noname0310 added enhancement New feature or request good first issue Good for newcomers labels Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants