Jump to content
Sign in to follow this  
Lord-Chaos

ATARI 8 Bit : RGB palette to ATARI 8 Bit palette ?

Recommended Posts

I want to convert AMIGA/PC/ST pictures to the ATARI 8 Bit.

 

But the problem is , that these computers use an RGB palette and the ATARI 8 Bit not.

 

How can I convert RGB colors to the colors the ATARI 8 Bit can display ?

 

Thimo

Share this post


Link to post
Share on other sites
I want to convert AMIGA/PC/ST pictures to the ATARI 8 Bit.

 

But the problem is , that these computers use an RGB palette and the ATARI 8 Bit not.

 

How can I convert RGB colors to the colors the ATARI 8 Bit can display ?

 

Thimo

 

On the Unconventional Event 2k2 in Legenfeld Mr.BOSS and me created a java based method in doing this in a quite usefull way. Here ist the method:

 

/**

* converts the given color object into a correspondig atari byte color

* © by Mirko Sobe (Mr.Boss XE)

*/

public int convertToAtari(Color pColor)

{

int col=0;

int r = pColor.getRed()/16;

int g = pColor.getGreen()/16;

int b = pColor.getBlue()/16;

int l = (r+g+b)/3;

int c=0;

 

if ( (r==g)&&(g==b)&&(b==r) ) c=0;

if ( (r==g)&&(b

if ( (r>g)&&(b

{

c=2; // sprung

}

else if ( (r>g)&&(r>b)) c=3;

if ( (r>b)&&(g

if ( (r==b)&&(g

if ( (r

{

c=6; //sprung

}

else if ( (r

 

if ( (r

if ( (r

if ( (rb) )

{

c=10; // sprung

}

else if ( (rb)) c=11;

 

if ( (r

 

return col=c*16+l;

}

 

You can even download my Atari Picture converter. This is a very simple command line programm which converts a prepared 160x192 "gif" oder "png" file to the 62sec format for the atari.

 

url: http://www.havemeister.net/public/atari/A8Pic.java

Share this post


Link to post
Share on other sites
On the Unconventional Event 2k2 in Legenfeld Mr.BOSS and me created a java based method in doing this in a quite usefull way. Here ist the method:

 

It is nice algorithm. Can I use it in my next GEM-View module? I wrote module for reading Koala files and now I can write saving one :wink:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...