Author Topic: DaDither - new image converter  (Read 5637 times)

0 Members and 1 Guest are viewing this topic.

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
DaDither - new image converter
« on: 03:02, 18 January 21 »
I want to introduce my image converter for Windows - DaDither. It can convert bmp/png/gif/jpeg into

- SCR+PAL files. Modes 0, 1 and 2 are supported. Loaded images can be "executed" with CALL &C7D0.
- PPH+EVE+ODD files (B0 format).
- HGB file (FutureOS wallpaper).
Download link.
« Last Edit: 07:13, 06 February 21 by Dec »
like
0
No reactions

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: DaDither - new image converter
« Reply #1 on: 11:01, 18 January 21 »
Really nice! I've seen a few mobile apps that offer different profiles but first time I see it for Windows. Works very nicely, though sometimes it fails, giving either a black output or the original image as output.

Thanks!!
like
0
No reactions

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #2 on: 11:09, 18 January 21 »
sometimes it fails, giving either a black output or the original image as output.
After several months of tool history you are the first who tell me about the problem. Can the problem be reproduced?
like
0
No reactions

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: DaDither - new image converter
« Reply #3 on: 11:39, 18 January 21 »

Haha let me check...


Apparently, yes. I used the attached. In CPC mode, mode 1/color I only get black; grey and B&W work ok. Same (black only) happens with Sam/Screen 3.


IBM VGA 320x200x8 returns the original (never have 8 colours looked better! :D )




like
0
No reactions

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #4 on: 11:50, 18 January 21 »
In CPC mode, mode 1/color I only get black; grey and B&W work ok. Same (black only) happens with Sam/Screen 3.
It is not a bug. It is a specific. ) The image is very dark by itself so the program cannot build correct palette. I will think about how to fix it.

IBM VGA 320x200x8 returns the original (never have 8 colours looked better! :D )
The program creates image that looks like original but not original. Original image has 1121 colors, converted image has 254 only.
320x200x8 means 8 bits per sample.
« Last Edit: 11:52, 18 January 21 by Dec »
like
0
No reactions

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.190
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: DaDither - new image converter
« Reply #5 on: 12:18, 18 January 21 »

It is not a bug. It is a specific. ) The image is very dark by itself so the program cannot build correct palette. I will think about how to fix it.


Ah, I'd think that color would fair at least as good as B&W or grey, but I see your point

The program creates image that looks like original but not original. Original image has 1121 colors, converted image has 254 only.
320x200x8 means 8 bits per sample.

 :picard2:
Please don't hold it against me, coffee hadn't kicked in yet.
like
0
No reactions

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 847
  • Country: gb
    • Awards
Re: DaDither - new image converter
« Reply #6 on: 12:27, 18 January 21 »

Great! These tools are always useful.

Could you add a contrast adjustment? It might mean the palette/image doesn't match the original, but for an 8-bitter's limited palette you would often have to resort to this anyway when doing graphics. I.e., you want to get the darkest colour on the image (which may range from mid-dark grey to pale grey in brightness) to black, and the lightest brighter as well (perhaps to white if that makes sense).


Perhaps another image adjustment ('crush to target palette') might try to push similar colours towards one target palette colour, to reduce wide bands of dithering (as in the example image above) to flat colours, even if it's not a perfect match for the original image. Of course this might be pretty hard to implement...


Obviously hand touching up afterwards is the best option regardless.
« Last Edit: 12:31, 18 January 21 by Sykobee (Briggsy) »
like
0
No reactions

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #7 on: 12:36, 18 January 21 »
Could you add a contrast adjustment?
It is planned.

push similar colours towards one target palette colour
How can I detect that 2 colors are similar? I need math formula.
like
0
No reactions

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #8 on: 13:10, 18 January 21 »
push similar colours towards one target palette colour
Also you can play with Error diffusion parameter.
like
0
No reactions

Offline XeNoMoRPH

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.173
  • Country: es
  • " ... in space no one , can hear you scream ... "
    • https://auamstrad.es/
    • Awards
Re: DaDither - new image converter
« Reply #9 on: 13:20, 18 January 21 »
one question from other guy, any chance to have the fullscreen mode included ?  :)
like
0
No reactions
your amstrad news source in spanish language : https://auamstrad.es

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #10 on: 13:29, 18 January 21 »
fullscreen
Do you mean overscan? Technically it is not a problem to add. The problem is how to save them. Is there any standard?
like
0
No reactions

Offline ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.446
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
    • Awards
Re: DaDither - new image converter
« Reply #11 on: 15:46, 18 January 21 »
Many thanks!


I plan on using this in the near future :)
like
0
No reactions

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 847
  • Country: gb
    • Awards
Re: DaDither - new image converter
« Reply #12 on: 17:08, 18 January 21 »
Do you mean overscan? Technically it is not a problem to add. The problem is how to save them. Is there any standard?


There was a tool called CpcConvImg, and another from Devilmarkus called JavaCPC-Paint, that supported executable (i.e., RUN "file.scr") overscan images in .scr format - it would be nice (but not necessary) to be compatible with one or the other, although that might take some disassembly and analysis. And presumably clean up on exit.


http://www.cpcwiki.eu/forum/programming/overscan/ was a thread I found on that. Also http://www.cpcwiki.eu/forum/programming/how-load-overscan-image-and-program-in-basic-loader/


I don't know if that helps.


like
0
No reactions

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.909
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: DaDither - new image converter
« Reply #13 on: 22:20, 18 January 21 »
Very nice! Would it be possible to have also the full screen picture format. In MODE 2 this would be 512*256, or MODE 1 is 256 * 256. In MODE 0 it would be 128 in X and 256 in Y.


It would be awesome to have such 16 KB fullscreen formats too.  :) :) :)
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #14 on: 00:51, 19 January 21 »
Would it be possible to have also the full screen picture format. In MODE 2 this would be 512*256, or MODE 1 is 256 * 256. In MODE 0 it would be 128 in X and 256 in Y.
Output file format specification?
like
0
No reactions

Offline XeNoMoRPH

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.173
  • Country: es
  • " ... in space no one , can hear you scream ... "
    • https://auamstrad.es/
    • Awards
Re: DaDither - new image converter
« Reply #15 on: 10:34, 19 January 21 »
It would be interesting to save a .SCR compatible with Convimg & IMPdraw, file format would be easy to implement and it will allow graphist to rework picture on CPCs.
like
0
No reactions
your amstrad news source in spanish language : https://auamstrad.es

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #16 on: 10:41, 19 January 21 »
It would be interesting to save a .SCR compatible with Convimg & IMPdraw
Are files created with current version of DaDither not compatible with Convimg & IMPdraw?
« Last Edit: 10:42, 19 January 21 by Dec »
like
0
No reactions

Offline Sid_

  • CPC664
  • ***
  • Posts: 134
  • Country: fr
    • Awards
Re: DaDither - new image converter
« Reply #17 on: 14:12, 19 January 21 »
If you want a sample code to export Overscan screen check this link https://github.com/jeromelesaux/martine/blob/46f8c8b3f028077f29a8b6e0515724c3c827b055/export/file/ocp.go#L8405


Hope it will help you.

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.909
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
    • Awards
Re: DaDither - new image converter
« Reply #18 on: 15:42, 19 January 21 »
Output file format specification?
Exactly 16 KB, on CPC &C000-&FFFF (inclusive). As file type you could use *.HGB for MODE 2 screens.
like
0
No reactions
http://futureos.de --> Get the revolutionary FutureOS (Update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #19 on: 03:13, 20 January 21 »
For everybody who want the program to create some new formats: you must understand that I am NOT Amstrad CPC user. All my knowledge about CPC are based on the wikipedia article. Those things that are completely clear to you are completely incomprehensible to me. So if you want some new format - give me a link to format specification but not short description only.
like
0
No reactions

Offline Sid_

  • CPC664
  • ***
  • Posts: 134
  • Country: fr
    • Awards
Re: DaDither - new image converter
« Reply #20 on: 13:37, 20 January 21 »
here  a description for impdraw format : http://impdraw.wikidot.com/le-format-impdraw-v2

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #21 on: 07:26, 02 February 21 »
Update: very first try to add B0 format (two screens in Mode 0):


You can save such images into PPH+EVE+ODD files and view them with Perfect Pix.

A request to the owners of real machines: could you check how images look on your monitors?
« Last Edit: 07:18, 06 February 21 by Dec »
like
0
No reactions

Offline eto

  • Supporter
  • 6128 Plus
  • *
  • Posts: 516
  • Country: de
    • Awards
Re: DaDither - new image converter
« Reply #22 on: 10:29, 02 February 21 »
A request to the owners of real machines: could you check how images look on your monitors?

Do you have some example images you are interested in? I can check it on a Plus and a CPC 6128, hooked to a 15kHZ capable TFT and a GBS8200 with a normal TFT.
like
0
No reactions

Offline Dec

  • CPC464
  • **
  • Posts: 23
  • Country: ru
    • Awards
Re: DaDither - new image converter
« Reply #23 on: 10:47, 02 February 21 »
Do you have some example images you are interested in?
You can convert any image you want with my tool and compare preview in the tool and image on your monitor. The tool allows you to select palette. There is no way to calculate exact values of mixed colors for TFT monitors so images will be different in any way because exact values depend on lots of parameters of monitor internal hardware and color settings. But which palette will be more accurate? Also what about flickering? Is flickering weak or intensive?
like
0
No reactions

Offline eto

  • Supporter
  • 6128 Plus
  • *
  • Posts: 516
  • Country: de
    • Awards
Re: DaDither - new image converter
« Reply #24 on: 11:42, 02 February 21 »
That's why I asked for example images. Then we can compare the different setups based on the same sources.
like
0
No reactions