English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Releases (https://eab.abime.net/forumdisplay.php?f=115)
-   -   IFF Palette Editor (https://eab.abime.net/showthread.php?t=88105)

Daedalus 31 July 2017 19:58

IFF Palette Editor
 
I've just released a palette editor I wrote for assisting in assembling palettes for game graphics. It requires AGA (no RTG support yet - sorry), and let you move around blocks of pens, import and combine palettes, preview the changes and save the palette either on its own or with a bitmap included. It also gives handy information about the pen the mouse is over (e.g. "Sprite 2/3, pen 1").

Pens can be modified using RGB, HSL or hex values, and can be rounded to 12-bit values prior to saving if required.

It's in the upload queue on Aminet, and also available from my website

Screenshot:
http://www.robthenerd.com/pics/PaletteEd-1.png

Cylon 31 July 2017 23:11

Nice!
What do you think about include standard colour names, like 'light blue' or 'magenta' or something like that for the ones with bad eye sight?

Daedalus 31 July 2017 23:28

Not a bad idea :) I can throw in the standard HTML colour table with all the standard names. Consider it on the to-do list for the next update.

daxb 01 August 2017 14:43

Only short test on A1200 040 3.1 and VisualPrefs running. Palette -> Insert from file (ILBM file) gives a guru here. I think it was Exception 00000020. With similar action (sorry, can`t remember but maybe Palette -> ...) I also got hits.

Maybe it is usefull to have the possibility to open on a larger screen for the preview IFF ILBM image?

Guide:
I`m not 100% sure but at the end of the guide there is no word wrap allowed after @ENDNODE. Multiview will only show an empty page here. If I remove the word wrap Multiview shows the guide correct. PowerGuide seems hasn`t a problem with this (works both ways).

Daedalus 01 August 2017 16:29

@daxb

Hmmm, that's strange. What sort of file are you trying to import, as in, is it an image or a plain palette? What bit depth? Perhaps if you could send me that file I could have a look and see what the problem is.

Yeah, a larger screen would be useful indeed, I'll add screenmode prefs to the next version.

As for the guide, it was working fine under Multiview for me, but that was under OS3.9 so there may be differences in the amigaguide.datatype that means I didn't spot the issue.

Thanks very much for the feedback!

daxb 02 August 2017 23:07

1 Attachment(s)
It was a simple ILBM image (705x570x4, attached) made with PPaint 7. Maybe the size? The preview looks wrong (colors and position of elements). Today I need to repeat the action to get the hits/exception:
Code:

02-Aug-17  15:24:41
LONG READ from 00000000                        PC: 01A2121C
USP : 019A53CE SR: 0015  (U0)(F)(-)  TCB: 0199D3D8
Data: 00002190 019A54F0 0000023A 0000000B 00000000 80080033 0000FECE 0000FFFF
Addr: 00000000 000A0CF8 019A53FE 019A6CF0 019A6CF0 0174AA20 01080CB0 010826EC
Stck: 019C3E74 019A54F0 01A21082 01A210D0 01974E50 019A6CF0 01A2CD68 01A2CDA0
Stck: 019C3E74 019A540A 01A1867A 00000010 00000000 023A02C1 01974F10 019A5436
Stck: 01A19C8C 00000000 00000010 00000000 00000000 00000030 01974DE8 023A02C1
Stck: 00000197 4E280001 019A5456 01A1A024 00000000 00000010 00000000 00040197
Stck: 4D900197 4C500000 FFFFFFE8 01A1D8CA 00000000 00020000 01000000 00000000
Stck: 02AE01A0 D8000000 00000000 00000000 00000000 00000000 00000000 00000000
----> 01A2121C - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 00013A1C
----> 01A21082 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 00013882
----> 01A210D0 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 000138D0
----> 01A2CD68 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0001F568
----> 01A2CDA0 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0001F5A0
----> 01A1867A - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0000AE7A
----> 01A19C8C - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0000C48C
----> 01A1A024 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0000C824
----> 01A1D8CA - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 000100CA
PC-8: B3FC0000 00006700 00BE92FC 00202041 58482C79 00000004 4EAEFF7C 20690004
PC *: B3D06600 013A2041 2029000C 58482F09 20592251 22882149 0004225F 2049D0FC
01a211fc :  b3fc 0000 0000            cmpa.l #$0,a1
01a21202 :  6700 00be                  beq $1a212c2
01a21206 :  92fc 0020                  suba.w #$20,a1
01a2120a :  2041                      movea.l d1,a0
01a2120c :  5848                      addq.w #$4,a0
01a2120e :  2c79 0000 0004            movea.l $4,a6
01a21214 :  4eae ff7c                  jsr -$84(a6)
01a21218 :  2069 0004                  movea.l $4(a1),a0
01a2121c : *b3d0                      cmpa.l (a0),a1
01a2121e :  6600 013a                  bne $1a2135a
01a21222 :  2041                      movea.l d1,a0
01a21224 :  2029 000c                  move.l $c(a1),d0
01a21228 :  5848                      addq.w #$4,a0
01a2122a :  2f09                      move.l a1,-(a7)
01a2122c :  2059                      movea.l (a1)+,a0
01a2122e :  2251                      movea.l (a1),a1
01a21230 :  2288                      move.l a0,(a1)
01a21232 :  2149 0004                  move.l a1,$4(a0)
01a21236 :  225f                      movea.l (a7)+,a1
01a21238 :  2049                      movea.l a1,a0
01a2123a :  d0fc 0014                  adda.w #$14,a0
Name: "PaletteEd"  Hunk 0000 Offset 00013A1C


02-Aug-17  15:24:41
Exception !!  00000020    TCB: 0199D3D8    CTX: 01122950    SSP: 01082720
USP : 019A53CE SR: 0010  (U0)(F)(-)  TCB: 0199D3D8
Data: 01A214E1 019A54F0 0000023A 0000000B 00000000 80080033 0000FECE 0000FFFF
----> 01A214E1 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 00013CE1
Addr: 00000000 000A0CF8 019A53FE 019A6CF0 019A6CF0 0174AA20 01080CB0 01082720
----> 017135AC - "System:Libs/amigaguide.library"  Hunk 0000 Offset FFFFFFFC
Stck: 019C3E74 019A54F0 01A21082 01A210D0 01974E50 019A6CF0 01A2CD68 01A2CDA0
Stck: 019C3E74 019A540A 01A1867A 00000010 00000000 023A02C1 01974F10 019A5436
Stck: 01A19C8C 00000000 00000010 00000000 00000000 00000030 01974DE8 023A02C1
Stck: 00000197 4E280001 019A5456 01A1A024 00000000 00000010 00000000 00040197
Stck: 4D900197 4C500000 FFFFFFE8 01A1D8CA 00000000 00020000 01000000 00000000
Stck: 02AE01A0 D8000000 00000000 00000000 00000000 00000000 00000000 00000000
----> 01A21362 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 00013B62
----> 01A21082 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 00013882
----> 01A210D0 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 000138D0
----> 01A2CD68 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0001F568
----> 01A2CDA0 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0001F5A0
----> 01A1867A - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0000AE7A
----> 01A19C8C - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0000C48C
----> 01A1A024 - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 0000C824
----> 01A1D8CA - "Ram:PaletteEd/PaletteEd"  Hunk 0000 Offset 000100CA
PC-8: FF602210 20416600 FECE323A FB846600 FF704679 01A20ED2 203C01A2 14E14E40
PC *: 6000FF5A 48E7C0C2 70147201 2C790000 00042079 01A2105A 4EAEFD3C 4A806700
01a21340 :  6000 ff60                  bra $1a212a2
01a21344 :  2210                      move.l (a0),d1
01a21346 :  2041                      movea.l d1,a0
01a21348 :  6600 fece                  bne $1a21218
01a2134c :  323a fb84                  move.w $1a20ed2(pc),d1
01a21350 :  6600 ff70                  bne $1a212c2
01a21354 :  4679 01a2 0ed2            not.w $1a20ed2
01a2135a :  203c 01a2 14e1            move.l #$1a214e1,d0
01a21360 :  4e40                      trap #$0
01a21362 : *6000 ff5a                  bra $1a212be
01a21366 :  48e7 c0c2                  movem.l d0-d1/a0-a1/a6,-(a7)
01a2136a :  7014                      moveq.l #$14,d0
01a2136c :  7201                      moveq.l #$1,d1
01a2136e :  2c79 0000 0004            movea.l $4,a6
01a21374 :  2079 01a2 105a            movea.l $1a2105a,a0
01a2137a :  4eae fd3c                  jsr -$2c4(a6)
01a2137e :  4a80                      tst.l d0
01a21380 :  6700 0138                  beq $1a214ba
Name: "PaletteEd"  Hunk 0000 Offset 00013B62

At the moment I use amigaguide.datatype 45.1 on my 3.1 system. Maybe it is in amigaguide.library, multiview or somewhere else? However, you are not the first one regarding the strange behaviour with word wrap at eof. Many years ago I only luckily noticed it. Btw. on Aminet there is a nice tool by Guido Mersmann: text/edit/guidecheck.lha

Daedalus 03 August 2017 00:00

Quote:

Originally Posted by daxb (Post 1175831)
It was a simple ILBM image (705x570x4, attached) made with PPaint 7. Maybe the size? The preview looks wrong (colors and position of elements). Today I need to repeat the action to get the hits/exception:

Thanks very much, that's most helpful! It appears to be a buffer overrun or something in one of Blitz's image loading commands. I did try it with a large image but maybe I got lucky and it worked, but now it seems to trash the program's memory when large bitmaps are loaded, causing a hard crash at the next memory manipulation/allocation operation. I'll swap it to an alternative routine and test it with your image (and other large images). In the meantime I'm afraid I can't think of a work-around other than cropping the bitmap for preview purposes. Sorry about that.

Quote:

At the moment I use amigaguide.datatype 45.1 on my 3.1 system. Maybe it is in amigaguide.library, multiview or somewhere else? However, you are not the first one regarding the strange behaviour with word wrap at eof. Many years ago I only luckily noticed it. Btw. on Aminet there is a nice tool by Guido Mersmann: text/edit/guidecheck.lha
Interestingly, the only issue GuideCheck found was the un-escaped @ symbol in my email address. It didn't find any issue at the end of the file, and it also works fine under 3.1 with the 3.1 datatypes, Multiview and amigaguide.library. But I'll take away the blank line at the end to make sure it works ok in the future on every combination.

Thanks again! :)

idrougge 03 August 2017 00:19

It's coded in Blitz? Blitz is notorious for crashing with VisualPrefs, or rather, VisualPrefs is notorious for crashing Blitz programs.

Daedalus 03 August 2017 00:29

Well, it also happens on a plain 3.1 setup so it's not the case here (though VisualPrefs does indeed have a habit of causing problems).

daxb 03 August 2017 15:36

Nice that you found the causer! :) Cropping the image is fine for now. Good would be if the window gets x/y sliders or something similar to move the clipping image IMO.

The "problem" with @ in email addresses is mentioned in the guide. I think that can be ignored. GuideCheck reported here "Line: 223" "Unknown command: 1". Options used: NodeNameCheck and HTDS but get it also without them.

Daedalus 03 August 2017 17:03

Quote:

Originally Posted by daxb (Post 1175928)
Good would be if the window gets x/y sliders or something similar to move the clipping image IMO.

That's already on the list ;) I actually had that feature in it but couldn't get it working properly so I disabled it until I had more time to figure it out.

Cylon 03 August 2017 19:02

Quote:

Originally Posted by idrougge (Post 1175856)
It's coded in Blitz? Blitz is notorious for crashing with VisualPrefs, or rather, VisualPrefs is notorious for crashing Blitz programs.

Hm, some sort of human myth?

idrougge 03 August 2017 23:44

No, just search the BlitzList archives for the term VisualPrefs.

daxb 04 August 2017 12:14

Maybe Blitz is the reason? In assumption the following is true:

VisualPrefs.guide says this:
"VisualPrefs works well with all programs respecting the rules, like adapting to the window border sizes, using system functions for creating/drawing gadgets, etc. Of course, badly written programs or programs using proprietary code for their interface (like MUI applications) will benefit very little from VisualPrefs."

Daedalus 01 October 2017 23:49

Okay, so I've uploaded a small update to this editor, mainly to fix the issue with the previewing of large images. So now large images don't cause an overflow and crash, and the preview window can now be resized and scrolled around using the arrow keys.

As for VisualPrefs, I don't actually think that's an issue as the screen is opened as private, not public, and so VisualPrefs leaves it alone with the default imagery.

I added some colour naming and identification, but to be honest it was actually quite slow on an 030 and made using the program feel a bit clunky, so I left it out. Perhaps in the future I'll come up with a more efficient way of identifying colours and use it instead.

Thanks for the feedback everyone :)

daxb 02 October 2017 14:24

I tested a bit PaletteEd 1.1. Works fine so far. What I noticed with MagicMenu active is that a mouse event from using the menu will select the pen under the mouse pointer after menu entry choice. Normaly that doesn`t happen with MagicMenu.

You could make the palette naming make optional via tooltype for example for the people who need it. :)

Feature request:
Open a larger screen to have some more space for review pictures.

Daedalus 02 October 2017 14:43

Ooh, that's interesting, and you're right - it shouldn't happen. I'll check it out.

Yeah, I'll probably include the colour naming later on as an option. I didn't have enough time to get it working as well as I'd like and wanted to fix the crashing bug, so released it as it was. The plan is to adapt it with RTG support, at which point it should be possible to choose any screenmode (or open it on a 24-bit Workbench screen), so that will allow the larger screens for better previews. It's on the list :)

Thanks for the feedback!

Cobe 23 October 2017 01:00

1 Attachment(s)
Nice tool! Great effort!
Don't know is it just my setup but both in stock wb3.1 and classicWB, menu background and font color are black. Luckily I had MagicMenu so I could read commands if I click somewhere on screen.
Actually I was looking for some remap tool that could not just swap colors in palette but both in iff picture... Would you consider adding that in some v1.2? :)

Daedalus 23 October 2017 14:35

Hmm, that's a strange one... Thanks for the report! What system are you using? WinUAE I take it, but emulating any particular system? Picasso96 installed?

Yep, I did consider the idea of saving the previewed image along with the palette, but was worried that it might drop other information (e.g. 24-bit images, colour cycling etc.). I can add that feature with a warning though.

Cobe 23 October 2017 15:51

1 Attachment(s)
WinUAE 3.5.0, emulating A4000 and A1200 no rtg, picasso.
If its of any help snoopdos.log attached but as I see only the things that should fail fail, cybergfx and wizard libs.

And about that "remap" what I actually thought is not just save new palette to previewed iff but... how to put it... like in dpaint if you would select two colors, remap them and then BG<->FG


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04870 seconds with 11 queries