Closed xeuyuuyuex closed 5 months ago
Hi,
There isn't really a good way of extracting the palette this way using a screenshot of the palette viewer. Since what you've generated is a BG palette, it has to reserve the first color for transparency (whether or not it actually exists), and the generator applies a sorting to the palette.
Given that it's a texture palette, extracting it from a memory dump will be difficult, requiring mapping that bank to LCDC before it's addressable to the ARM9. One idea to try perhaps is to try cropping the screenshot to just the palette colors, and try resizing to 16x16 using nearest neighbor. Hopefully some cropping of the screenshot will allow for this to give you the palette unaltered. Then when you have this, in NitroPaint you can go to File->New->Palette, then press Ctrl+A (select all), right click, and click Import, which will have you select an image file. Then select the image you just created, and it will import all of the image's colors in order into the palette.
hope this helps!
Hi~ I tried using OpenCV to extract colors from the center and generate a 16 x 16 pixel image. However, I'm not sure what went wrong with OpenCV; there were only 16 pure colors in my input image, but now they appear mixed, resulting in color distortion in the extracted image. Nevertheless, this method does create a palette. Do you have any suggestions to prevent color mixing?
↑ my input image
↑ In the process image output by OpenCV, when I use a color picker to inspect the color blocks, there are many mixed colors in each grid.
↑ Result palette...
AHA! It was just because my output format was jpg. After changing it to png, everything turned out perfect! Thank you!
Hello, I found the palette I need in the DESMUME emulator's palette viewer, but it doesn't have an export function. So I hope to take a screenshot and then use nitropainter to convert it from an image to .NLCR. However, when I use "open > create BG > all default settings," the resulting palette doesn't match the one in the image. Is there any way to solve this? Or can I extract the colors from the 256 cells externally and then generate the palette by calling nitropainter's method with the data?
On the left is the generated palette, and on the right is the palette I screenshot from the DESMUME palette viewer. ( I've tried using 512 x 512, 256 x 256, 256 x 192 image sizes but all the same unmatched results. )