English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 26 June 2020, 20:44   #1
Toki
Registered User
 
Toki's Avatar
 
Join Date: Feb 2016
Location: Birmingham
Age: 60
Posts: 107
Sprite editor: software to convert image to C code

Hi

Is there an easy way to convert an image to code that I can load into my C program?

I thought I might be able to do this in Deluxe Paint somehow.

I can see programs that convert images to Hex, but I need one that will convert it into code e.g.

0x0000, 0x0000,
0x0180, 0x0000,
0x03C0, 0x0000,
0x07E0, 0x0000,
0x0FF0, 0x0000,
0x1FF8, 0x0000,
0x3FFC, 0x0000,
0x7FFE, 0x0000,
0x0000, 0xFFFF,
0x0000, 0xFFFF,
0x7FFE, 0x7FFE,
0x3FFC, 0x3FFC,
0x1FF8, 0x1FF8,
0x0FF0, 0x0FF0,
0x07E0, 0x07E0,
0x03C0, 0x03C0,
0x0180, 0x0180,
0x0000, 0x0000

Thanks
Toki is offline  
Old 26 June 2020, 21:24   #2
kamelito
Zone Friend
 
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 1,801
http://aminet.net/package/gfx/conv/PicCon250
kamelito is offline  
Old 27 June 2020, 11:57   #3
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Personal Paint can save images as C code.
idrougge is offline  
Old 27 June 2020, 13:32   #4
Toki
Registered User
 
Toki's Avatar
 
Join Date: Feb 2016
Location: Birmingham
Age: 60
Posts: 107
Thanks Kamelito. I've loaded PicCon250. I can see there is a option to save an image as C code which will be perfect. The only problem is I now need the keyfile for PicCon because I can't change the preferences without it. Do you know where I can get the keyfile?

Idrougge - thanks for the suggestion about Personal Paint - I shall keep this as Plan B if I can't get PicCon working.
Toki is offline  
Old 27 June 2020, 14:28   #5
tolkien
AmigaMan
 
tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
You can also try artpro

http://aminet.net/package/gfx/conv/ArtPRO1.20
tolkien is offline  
Old 28 June 2020, 11:36   #6
Toki
Registered User
 
Toki's Avatar
 
Join Date: Feb 2016
Location: Birmingham
Age: 60
Posts: 107
Artpro was a good suggestion. It's taking a bit of fiddling around, but I'm managing to save the sprite picture in C Code UWORD format, and load it into a program and compile it. The sprite looks a mess when loaded, but at least it's a start.
Toki is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monitors which convert image to 60Hz mark_k support.Hardware 2 12 April 2017 22:43
AMOS (Editor) Source Code SparkyNZ request.Apps 4 25 March 2017 00:49
convert an icon file into an OS image structure dc.l AGS Coders. System 2 14 December 2013 19:10
A program to convert Png to Iff. Image Studio? Retrofan support.Apps 14 18 January 2011 22:03
Backbone image editor. Dreedo support.Apps 4 18 January 2011 00:20

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07110 seconds with 15 queries