[Coco] Is there a way to import JPGs or BMPs to a CoCo picture file format that can be used in a program, game etc?
Joel Ewy
jcewy at swbell.net
Fri Jan 15 11:46:14 EST 2010
John W. Linville wrote:
> On Fri, Jan 15, 2010 at 09:20:34AM -0600, Joel Ewy wrote:
>
>
>> The only reason I haven't reworked my cocoscale.pl to make these 256
>> artifact color pictures is this quote from the documentation for
>> 'pnmremap,' the NETPBM tool for making an RGB image into an indexed
>> image:
>>
>> "For historical reasons, Netpbm sometimes calls the palette a
>> "colormap." But it doesn't really map anything. *pnmremap* creates its
>> own map, based on the palette, to map colors from the input image to
>> output colors."
>>
>> For the fixed palette file to work correctly, the output image must be
>> indexed to the palette in the same order. The above quote seems to
>> suggest that pnmremap sees the palette file as a mere suggestion and may
>> not do an ordered mapping to it.
>>
>
> Yeah, if it kept the same set of colors but swizzled the ordering
> then it wouldn't help you much. Of course, if your PC-based program
> used a different/better/preferred dithering algorithm then even if it
> swizzled the colors you could run the image through that tool then use
> some version of my tools (w/o the dithering) to remap the colors back
> to their original indexes -- pretty sure that would work. Or if you
> aren't that picky, you can just use my tools w/ the Floyd-Steinberg
> dithering... :-)
>
>
Judging from the dithered version of your slideshow, I'm pretty sure
your tools produce decent output. I still intend to figure out git and
'git' your program and try it out.
>> -- Aside to Linville: Apparently ImageMagick doesn't have this feature?
>>
>
> I'm pretty sure it does:
>
Yeah, I wasn't clear. I should have said: "Apparently ImageMagick
doesn't suffer from the "feature" of not actually indexing the image to
the supplied color map in order." But in fact, we don't know that,
since you did your own mapping...
> http://www.imagemagick.org/Usage/quantize/#map
>
> But that makes it look like you'd need to feed it a GIF rather than the
> .pal file -- not sure.
It shouldn't be hard to convert the .pal to a GIF I think.
> I did the mapping in my tool partly because
> I'm not that familiar with the available tools and partly because I
> wanted to learn more about how colors are matched algorithmically. :-)
>
>
A laudable reason, indeed!
JCE
> John
>
More information about the Coco
mailing list