Jump to content
IGNORED

4 Colour Editor


snicklin

Recommended Posts

I am looking for a Windows or Linux based editor for manipulating for editing 4 colour pictures.

 

I then want to save the file to a raw bytes format. The bytes which it saves also need to be packed, so that 1 byte contains the contents of 4 pixels.

 

I am not interested in a chain of tools, i.e. You draw it in Paint and then import it into somewhere else and then run it through something else.

 

In this particular instance, I have a 128 x 24 pixels image which I want to be able to write straight to a file of 768 bytes. I do not need any colour information encoded into the file, just pure pixel values.

Edited by snicklin
Link to comment
Share on other sites

I'd have suggested GIMP which can be had on both Win/Linux but quick check seems to indicate that it doesn't save raw image data with the pixels packed, ie I converted something to 4 colours but the saved file was still 1 byte/pixel.

 

There's FAIL (thread elsewhere) but I'm not sure of what editing capability it has or if it deals with raw data as well as the common Atari pic formats.

 

Personally I've used a mix of Paint, Photoshop and Gimp depending on what needs doing.

 

Gimp is pretty handy for most tasks. Not being able to necessarily save the raw data in the way you want can be an annoyance but for me not a deal-breaker.

 

It's pretty easy to massage data by just writing a Basic program in the emulator and run it in turbo mode, although can be a pain if dealing with something you're constantly adding to or changing.

Link to comment
Share on other sites

I'd have suggested GIMP which can be had on both Win/Linux but quick check seems to indicate that it doesn't save raw image data with the pixels packed, ie I converted something to 4 colours but the saved file was still 1 byte/pixel.

 

There's FAIL (thread elsewhere) but I'm not sure of what editing capability it has or if it deals with raw data as well as the common Atari pic formats.

 

Personally I've used a mix of Paint, Photoshop and Gimp depending on what needs doing.

 

Gimp is pretty handy for most tasks. Not being able to necessarily save the raw data in the way you want can be an annoyance but for me not a deal-breaker.

 

It's pretty easy to massage data by just writing a Basic program in the emulator and run it in turbo mode, although can be a pain if dealing with something you're constantly adding to or changing.

 

Hiya, thanks for the reply.

 

I've tried using GIMP and have managed to output a raw file for a 4 colour image. However, it wasn't bitpacked.

 

I could write a tool (probably in Perl) to pack the data, but I keep on writing little mini tools to do jobs for me. I'll probably do this, though I'd rather spend my time on real Atari programming. I just can't believe that there's no tools around that seem to do this natively without creating a tool chain.

 

I've taken a look at FAIL and the version I'm looking at doesn't have any exporting to RAW files.

Link to comment
Share on other sites

I'd have suggested GIMP which can be had on both Win/Linux but quick check seems to indicate that it doesn't save raw image data with the pixels packed, ie I converted something to 4 colours but the saved file was still 1 byte/pixel.

 

There's FAIL (thread elsewhere) but I'm not sure of what editing capability it has or if it deals with raw data as well as the common Atari pic formats.

 

Personally I've used a mix of Paint, Photoshop and Gimp depending on what needs doing.

 

Gimp is pretty handy for most tasks. Not being able to necessarily save the raw data in the way you want can be an annoyance but for me not a deal-breaker.

 

It's pretty easy to massage data by just writing a Basic program in the emulator and run it in turbo mode, although can be a pain if dealing with something you're constantly adding to or changing.

 

The good old days where I used to write converters in TurboBasic XL :)

I know it's not what the OP wanted, but GIMP and a simple Python program is the fastest possibility. And should work on windows and Linux ( I use Linux)

To save a lot of (repeated) fiddling, I use make to call the converter in the build script.

Link to comment
Share on other sites

I am looking for a Windows or Linux based editor for manipulating for editing 4 colour pictures.

...

In this particular instance, I have a 128 x 24 pixels image which I want to be able to write straight to a file of 768 bytes. I do not need any colour information encoded into the file, just pure pixel values.

Is aspect ratio of the pixels relevant (2/1)?

You could use http://g2f.atari8.info/

in 32 byte wide mode...

Edited by Irgendwer
  • Like 1
Link to comment
Share on other sites

Is aspect ratio of the pixels relevant (2/1)?

You could use http://g2f.atari8.info/

in 32 byte wide mode...

 

I've just tried using g2f and it seems fine if you want a 256 pixel wide screen, but I'm using a narrow mode screen and want the 128 pixels to be used (rather than 64 doubled up).

 

I'll write a little Perl program to convert the picture, though it just seems mad that nobody would have done this before.

 

I like to do my development on the PC, so I won't be writing any basic programs!! That is so '87! :)

Link to comment
Share on other sites

I'll write a little Perl program to convert the picture, though it just seems mad that nobody would have done this before.

The chances are they have, it's just that the little programs aren't considered worth releasing.

Link to comment
Share on other sites

The chances are they have, it's just that the little programs aren't considered worth releasing.

 

Well, I'll buck the trend then....!

 

Here's a ~rough~ Perl function which can be used to bitpack everything.

 

Limitations:

File size must be a multiple of 4.

Byte values must be 0->3. GIMP must be set up in indexed mode. Then you need to open a sector editor on the file and replace all values with 0>3 values.

 

Didn't take as long as expected, but seems to do the job. Usage: Pass the filename to bitpack.

 

sub bitpack
{
my $fileToPack=shift;
my $buffer, $count=0;
print " Packing: $fileToPack\n";
open(IN,$fileToPack);
binmode IN;
open(OUT,">${fileToPack}packed");
binmode OUT;
my $head1,$head2,$head3,$head4;
my $total;
while(read(IN,$head1,1))
{
$h1=ord(substr($head1,0,1));
read(IN, $head2, 1);$h2=ord(substr($head2,0,1));
read(IN, $head3, 1);$h3=ord(substr($head3,0,1));
read(IN, $head4, 1);$h4=ord(substr($head4,0,1));
$count++;
$total = (64*$h1);
$total+= (16*$h2);
$total+= (4*$h3);
$total+= $h4;
print OUT chr($total);
}
close(OUT);
close(IN);
print "Packing completed for: ${fileToPack}packed ($count bytes)\n";
}
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...