Bitcoin STAMPS: Improving your image size in KBs before minting
Given the current Bitcoin network fees, the size of an image file plays a crucial role in the minting process of a Bitcoin STAMP. There are diverse methods to craft art and optimize file sizes. It is recommended to experiment with various tools and techniques to pinpoint the most effective solution for your specific image, all the while maintaining a backup of the original file for reference.
It’s essential to bear in mind that the file size of a Bitcoin STAMP must not exceed 7kb. While I typically lean towards using the PNG format when working with images for Bitcoin STAMPS, it’s worth noting that this might not be the definitive format, as alternatives like SVGs or GIFs can also be explored.
Let’s delve into two file formats — PNG and SVG — each paired with a specific tool. Personally, for PNG file compression, I turn to an online tool named TinyPNG. As for SVGs, my tool of choice is an online tool called Compress or Die.
PNGs
In my preferred pixel art tool, I crafted an image measuring 128x128 pixels.
Achieving a reduced file size for a PNG image without compromising acceptable quality requires the application of various techniques from the initial stages of its creation. The pixel dimensions are typically a variable that you establish at the outset of your artistic endeavor. Since Bitcoin STAMPS involve relatively small images and are rooted in pixel art, this article does not address resizing the image with a tool.
After exporting it as PNG file with file explorer check the Size, in this case 2,24KB.
Open TinyPNG and drop your image
You will see that automatically your image reduced the size of the file. In this case 66%.
Download the image, make sure that you do not overwrite the file.
You can compare both files, in this case the file size went from 2,24Kb to 0,783 Kb.
Convert to Indexed Color
If your image has a limited color palette, converting it to indexed color can significantly reduce file size. Tools like Photoshop or GIMP can help with this.
Remove Unnecessary Metadata
PNG files often contain metadata such as creation date, software used, etc. Removing this metadata can reduce file size without affecting image quality.
Optimize Transparency
If your image has a transparent background, consider using an alpha channel only where necessary. Removing unnecessary transparent areas can reduce file size.
Check the Results
After each optimization step, visually inspect the image to ensure that the quality is acceptable.
SVGs
In my preferred pixel art tool, I crafted an SVG mage and export it.
Check the initial file size
As you can see the initial size is 2.73Kb
Go to Compress or Die website. https://compress-or-die.com/svg
Upload your SVG file and you will see already a reduction of the file size, if possible by the default settings
You have the flexibility to adjust a few settings and observe their impact on both the file size and your design.
For instance, modifying the decimal precision to 0 reduces the file size to 1.49kB, marking a 44.77% reduction from the initial file size.
Ensure to click on “Generate Optimized Image” after adjusting the settings.
Following each optimization tweak, visually assess the image to confirm that the quality remains satisfactory.
Once that you are happy with the size and impact to the design, you can click on Download.
Thanks for reading!
If you like this article check my collection at: https://stamped.ninja/profile/TonyNL/collections