Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Converting GFX question
2023-03-09 08:56
CreaMD

Registered: Dec 2001
Posts: 3034
Converting GFX question

Asking for friend. Quote follows:
---
Morning! Does anyone of you please know a Window C64 converter that would not do any processing and just save data in C64 format?

What's my problem: I prepared a 4-color (so that I can convert to multicolor sprites) picture in Gimp and then ran it through a converter, which decided to just add a 5th color. 🤦‍♂️
---

Thank you for quick help everybody.
2023-03-09 09:58
Mr. SID

Registered: Jan 2003
Posts: 419
Typical answer:

Is the friend a coder? Then tell him to write a 10-line python script to convert the image to sprite data.

If he's just an artist, then he should let the coder that makes the game/demo write a script/tool.
2023-03-09 11:31
Oswald

Registered: Apr 2002
Posts: 5007
change palette of src picture to the same the converter expects.
2023-03-09 12:42
Youth

Registered: Aug 2003
Posts: 40
I made a command line converter with this usecase in mind:

https://github.com/micheldebree/retropixels/blob/master/cli/REA..

Quote:

Pixel perfect input

If you want to convert pixels one-on-one (for sheets of sprites for example), make sure to:

use the --palette option and make sure the input colors map correctly on the palette
use --scale none
use --ditherMode none

This should apply to other converters aswell. So like Oswald said, make sure the palette maps correctly and also make sure there is as little other processing going on (scaling, dithering etc.) as possible.
2023-03-09 13:13
Wotnau

Registered: Jan 2002
Posts: 7
Hi, that friend is me. To give you some context:

Use case: What I did was prepare a pic in Gimp, 320x200 in 4-color palette, all "pixels" 2 "dots" wide, perfectly ready for one-to-one conversion to 4-color multicolor. Then I sent it through a converter that decided to add a 5th color, probably for a better taste or something. I don't care if the converter gets the colors wrong (e.g. turning a light grey into yellow), but all pixels of color X on the PC must be turned into pixels of color Y on the C=64.

User: I'm fluent in C=64 speak, a C=64 assembly coder, hopeless at graphics. I have no knowledge whatsoever of PC programming, am a Windows user that needs a GUI. Last time I used command line input was probably with ARJ in the '90s (and most times I got it wrong). Whenever I read stuff like, "Everyone can easily compile their own core", I'm lost.

It seemed to me that the tool Youth had described fit my case. I saw the documentation, I can appreciate how detailed it is, and I still have no idea how to use it.

I'm just convinced that there must be a simple converter that, if it sees that the pixel widths are alright and there are no color clashes, will turn a 320x200 4-color picture into a 320x200 4-color C=64 picture without imposing its own intelligence on me or the source data. :)
2023-03-09 14:12
Youth

Registered: Aug 2003
Posts: 40
@Wotnau There is a GUI version here: https://www.micheldebree.nl/retropixels

Set it to crop the picture, which should disable scaling and set dithering to zero. See how that works out.
2023-03-09 14:53
Wotnau

Registered: Jan 2002
Posts: 7
@Youth Thanks a lot for the tip. Gonna try it in the evening when I'm back home, but I'm hopeful. :)
2023-03-09 18:47
Wotnau

Registered: Jan 2002
Posts: 7
@Youth: It works like a charm, doing exactly what I need. I'm very much obliged to you! How exactly do you want to be special-thanked in our demo? :)
2023-03-09 20:35
Youth

Registered: Aug 2003
Posts: 40
Great! Do whatever you like. Something along the lines of me being the most awesome dude in the world, and me proving that it is indeed possible to be smart, kind, talented and incredibly sexy at the same time, will be fine.

;)
2023-03-09 21:08
Burglar

Registered: Dec 2004
Posts: 1027
is it too late to plug png2prg 1.2?
it has auto palette detection :)

jeugd 1 - burg 0 ;)
2023-03-09 21:08
chatGPZ

Registered: Dec 2001
Posts: 11088
I am confused as to why noone mentioned Gimp cbmplugs 1.2.2 - install that in gimp, and save directly as koala
2023-03-10 06:28
oziphantom

Registered: Oct 2014
Posts: 478
because then they would need to convert Koala to sprites.. maybe you could use C128 BASIC to do that though..
2023-03-10 18:56
Wotnau

Registered: Jan 2002
Posts: 7
@Burglar As it looks like it needs command line input, I won't be able to use it (see my post on use case and user above), but if someone more PC literate finds this thread later, it may serve them just great. :)
@groepaz Hm, they say that installing Gimp plugins is foolproof. Whatever I did, I either did something wrong or now can't find where to look for the right option. I thought it would be Export, but I either screwed up the install, or am blind.

Either way, thanks for your help or trying to help, everyone. As I already have a tool that does what I need (thanks again, Youth!), I'll focus on actually doing the stuff instead of procrastinating around it. That bloody party starts in a week, and I still don't have a single line of source code. :)
2023-03-10 19:21
chatGPZ

Registered: Dec 2001
Posts: 11088
When the plugin is installed, you should have a "commodore 64" palette in the palette dialog (this is the pepto palette i think), and in the "export as" dialog you can select koala (and many other c64 filetypes)
2023-03-14 11:26
Jetboy

Registered: Jul 2006
Posts: 208
In Photoshop you can set pixel aspect ratio to be other than 1:1 It is more convenient than doubling pixels.

I do not know if there is similar setting in Gimp, as i'm not that masochistic to use it, but probably there is.
2023-03-14 11:41
Krill

Registered: Apr 2002
Posts: 2804
Quoting Wotnau
As it looks like it needs command line input, I won't be able to use it (see my post on use case and user above), but if someone more PC literate finds this thread later, it may serve them just great. :)
Come on, what's so hard about using the command line to run a program with a few simple options? :)
2023-03-14 11:55
CreaMD

Registered: Dec 2001
Posts: 3034
Quote: Quoting Wotnau
As it looks like it needs command line input, I won't be able to use it (see my post on use case and user above), but if someone more PC literate finds this thread later, it may serve them just great. :)
Come on, what's so hard about using the command line to run a program with a few simple options? :)


I can tell you that there were times when I preffered Tortise GIT to command line, and still do in some cases with GIT. For someone who never used it and does't know how to ask when there are problems, it's something hard to adopt. I still ignore most of the verbal output that some commandline thingies puke out on screen. Offtopic: By the way, speaking about command line thingies. DDEV (solely using command line interface) in combination with WSL2 and Docker is a swiss knife for local development, no more local linux server running on local network, that was a hell for me I hated everything about it, including git conflicts caused by samba all the time. I love the times I live in. I love how chatGPT/AI can help you with coding (and not only). Did I say I love the times we live in? Yeah I did, fine. Just a sidenote, I find it quite absurd that there is a war nearby, based on utterly ridiculous accusations and claims. I can't believe it's happening with all these information technology advances. We are so clever and dumb at the same time. Fucking hell. End of rant.
2023-03-14 20:22
Burglar

Registered: Dec 2004
Posts: 1027
do you remember a time when you turned on your computer, all you got was a basic prompt? :P
2023-03-14 22:12
TheRyk

Registered: Mar 2009
Posts: 2035
If you don't like command lines, use batches
- not that this really makes a hell of a difference :D
2023-03-14 22:13
hedning

Registered: Mar 2009
Posts: 4548
Refusing to learn stuff is just lazy. Of course it's easier to demand a dragndrop thing than to spend 5 minutes learning how to use command prompt things. But cmon. It's not rocket science. I don't buy the "fact" that someone is completely unabled to use or learn how to use a command prompt. Except for my dad. Actually he should not be allowed to own a computer at all.
2023-03-15 12:22
Oswald

Registered: Apr 2002
Posts: 5007
Quote: Quoting Wotnau
As it looks like it needs command line input, I won't be able to use it (see my post on use case and user above), but if someone more PC literate finds this thread later, it may serve them just great. :)
Come on, what's so hard about using the command line to run a program with a few simple options? :)


ask anyone who tried to compile your loader and failed =)
2023-03-15 12:36
Krill

Registered: Apr 2002
Posts: 2804
Quoting Oswald
ask anyone who tried to compile your loader and failed =)
Strawman argument. Using a precompiled tool like Burglar's has a lot fewer likely breaking points than building something yourself. =)

(Besides, some people were quite delighted how easy building the loader is once you have the dependencies in place and know how those standard tools like make etc. work. =D)
2023-03-15 15:40
Oswald

Registered: Apr 2002
Posts: 5007
Quote: Quoting Oswald
ask anyone who tried to compile your loader and failed =)
Strawman argument. Using a precompiled tool like Burglar's has a lot fewer likely breaking points than building something yourself. =)

(Besides, some people were quite delighted how easy building the loader is once you have the dependencies in place and know how those standard tools like make etc. work. =D)


nope, thats not a strawman. also that it needs a precompiled tool and dependencies and learning make just proves my point. its not about saying your loader sucks, I view it as one of the biggest achievment of mankind, just showing how complicated CLI can be.
2023-03-15 17:08
Jetboy

Registered: Jul 2006
Posts: 208
They can be complicated, but it's not the case this time.
What triggers me are people who ask for help, and when they get it they start to moan that they won't use it because some stupid excuse.
2023-03-15 17:10
chatGPZ

Registered: Dec 2001
Posts: 11088
Quote:
just showing how complicated CLI can be.

LOL. Supposed coders and their fear of commandlines.
2023-03-15 18:13
Burglar

Registered: Dec 2004
Posts: 1027
Quoting Oswald
.. that it needs a precompiled tool and dependencies and learning make just proves my point..
You are mixing things up. png2prg 1.2 is the precompiled tool that will run an any OS, it has literally zero dependencies, it's static binary.
Just run "png2prg.exe bla.png" and you will get a bla.prg with the gfx data (koala, hires, chars or sprites).

For compiling Krilllloader, you need dependencies installed, not to be compared with a simple gfx converter.

jeugd 1 - burg 1 (hijacking thread succeeded;)
2023-03-15 19:44
Cruzer

Registered: Dec 2001
Posts: 1048
Quote:
Supposed coders and their fear of commandlines.
Using commandlines != coding though.
2023-03-15 19:45
Oswald

Registered: Apr 2002
Posts: 5007
I apologize for not reading through the thread just jumping on a post randomly.
2023-03-15 20:36
Burglar

Registered: Dec 2004
Posts: 1027
Quote: Quote:
Supposed coders and their fear of commandlines.
Using commandlines != coding though.


I disagree, bash is turing-complete :)
2023-03-15 23:07
Cruzer

Registered: Dec 2001
Posts: 1048
Quoting
I disagree, bash is turing-complete :)
Yeah, I know, but reading readme-files, typing "make", googling error messages and installing dependencies doesn't seem very much like coding to me.
2023-03-16 00:23
CreaMD

Registered: Dec 2001
Posts: 3034
The tool was found. Questions were answered.

I'm glad Wotnau doesn't waste his life here and does something creative on C64 instead.

Time to close.
2023-03-16 08:38
Burglar

Registered: Dec 2004
Posts: 1027
Quoting CreaMD
I'm glad Wotnau doesn't waste his life here and does something creative on C64 instead.
great, means we don't need to waste our lives anymore trying to help you \o/

really, I don't understand your passive aggressive attitude, it comes across as entitled and ungrateful. bah.
2023-03-16 09:42
CreaMD

Registered: Dec 2001
Posts: 3034
Quote: Quoting CreaMD
I'm glad Wotnau doesn't waste his life here and does something creative on C64 instead.
great, means we don't need to waste our lives anymore trying to help you \o/

really, I don't understand your passive aggressive attitude, it comes across as entitled and ungrateful. bah.


I wasn't asking for myself. And this was not aimed at you but at everyone not empathic enough to imagine, that there might be self-taught c64 coders that never actually were programmers for living and commandline is a "distant" concept to them. I think, in my honest opionion, that I was polite in that aspect, because if you look at this debate from distance, there is no real help in the rest of this thread. I admit, that I contributed to that too.

p.s.: And you are right. I forgot to thank everybody who helped. So. Thank you guys!
2023-03-16 12:19
Krill

Registered: Apr 2002
Posts: 2804
Quoting CreaMD
imagine, that there might be self-taught c64 coders that never actually were programmers for living and commandline is a "distant" concept to them.
I thought the usual process was to be a self-taught C-64 coder first (in teenage years) to eventually become a professional programmer later, building on that C-64 knowledge. Not the other way around. =)
2023-03-16 12:33
Hein

Registered: Apr 2004
Posts: 933
Quote: Quoting CreaMD
imagine, that there might be self-taught c64 coders that never actually were programmers for living and commandline is a "distant" concept to them.
I thought the usual process was to be a self-taught C-64 coder first (in teenage years) to eventually become a professional programmer later, building on that C-64 knowledge. Not the other way around. =)


Still so, you were not a programmer before you became a self-taught c64 coder in your teenage years, I suppose. Unless your mom gave birth to a professional programmer, of course.

But may I suggest Spritepad for this thread?
2023-03-16 12:44
Krill

Registered: Apr 2002
Posts: 2804
Quoting Hein
Still so, you were not a programmer before you became a self-taught c64 coder in your teenage years, I suppose. Unless your mom gave birth to a professional programmer, of course.
"Self-taught" is the magic word here, i suppose. =)
2023-03-16 12:47
Hein

Registered: Apr 2004
Posts: 933
Quote: Quoting Hein
Still so, you were not a programmer before you became a self-taught c64 coder in your teenage years, I suppose. Unless your mom gave birth to a professional programmer, of course.
"Self-taught" is the magic word here, i suppose. =)


Heh, imo it was 'were'. Which shows the difference in interpretation of words and sentences, leading to derailed forum threads.
2023-03-16 15:47
Oswald

Registered: Apr 2002
Posts: 5007
Quote: The tool was found. Questions were answered.

I'm glad Wotnau doesn't waste his life here and does something creative on C64 instead.

Time to close.


Nobody should waste his life by telling people what they should do and what not. We shouldnt have fun here indeed, this is serious website, users should be banned from chit chatting, so moderators can idle in peace.
2023-03-16 15:57
chatGPZ

Registered: Dec 2001
Posts: 11088
"empathic enough to imagine, that there might be self-taught c64 coders that never actually were programmers for living and commandline is a "distant" concept to them"
You literally not be a self taught c64 coder, without starting on the command line. And i am pretty sure every c64 programmier has used it. Which makes fear of command line kind of funny indeed.
2023-03-16 21:23
Youth

Registered: Aug 2003
Posts: 40
Wow this spiralled out of control fast :) For what it's worth, I kind of regret making a GUI version of retropixels. It was a kind of proof-of-concept, but I broke my own rule of never giving a tool away without being prepared to maintain it. As a coder I want command line tools that I can automate and integrate into my development process, and now I am having to dodge questions about feature requests and bugs. Boohoo! It will probably go away some day because of lack of priority and then there's only command line left...

jeugd 1 burglar 2 for sticking with just the command line tool
2023-03-16 22:00
CreaMD

Registered: Dec 2001
Posts: 3034
Quoting Krill
I thought the usual process was to be a self-taught C-64 coder first (in teenage years) to eventually become a professional programmer later, building on that C-64 knowledge. Not the other way around. =)


Imagine someone choose different career path. And he is good at it. C64 is his exit to the world of childhood/younghood dreams.

Quoting Youth
Wow this spiralled out of control fast :) For what it's worth, I kind of regret making a GUI version of retropixels. It was a kind of proof-of-concept, but I broke my own rule of never giving a tool away without being prepared to maintain it. As a coder I want command line tools that I can automate and integrate into my development process, and now I am having to dodge questions about feature requests and bugs. Boohoo! It will probably go away some day because of lack of priority and then there's only command line left...

jeugd 1 burglar 2 for sticking with just the command line tool


If it helped him to achieve his goal, then it was worth it I think. Thanks.
2023-03-17 08:07
TWW

Registered: Jul 2009
Posts: 541
Quoting CreaMD
Imagine someone choose different career path. And he is good at it. C64 is his exit to the world of childhood/younghood dreams.


+1

Never worked as a programmer, but strangely enough it has been very usefull to know a little about bits and bytes in every situation i have been in professionaly (which has ranged from high tech space/subsea exploration to technical ship management and a lot of other weird stuff). It goes with the story though that most of those I considered "coders" in my home area back in the day (~10 people) have gone into programming and IT. Some have climbed the corporate ladders and don't program anymore but some still are.

It's a good hobby, but the motivation to "produce" anything is long gone as there can be no 'reward' like it was when you were 12 and managed to put something in the sideborder to all your little nerd-buddies awe. What's most rewarding to me these days is to take ancient ineficcient code and optimize it :)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Bob/Censor Design
deetsay
Mikael/Pretzel Logic
hedning/G★P
Aomeba/Artline Desig..
Matt
Hani
Nordischsound/Hokuto..
Guests online: 289
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Mutetus  (9.6)
4 Linus  (9.6)
5 Jammer  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.111 sec.