Search found 54 matches

by sam
Thu Sep 26, 2019 11:38 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

I can't get any of the binary file from the svn browser (it shows as ascii, see >> this <<). What's the trick? I can make that 6 pixel blank margin an option changeable with a flag. But how to detect that the flag is to be set to true or false ? I don't see any well defined decision procedure here: ...
by sam
Thu Sep 26, 2019 6:42 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

This is because in the code I have put this protection local function getLinearPixel(x,y) if x<6 then return Color:new() end -- first 6 horiz pixels are reserved The algorithm doesn't do anything special to those 6 pixels, it is just that I thought that colored pictures always need to have these 6 b...
by sam
Thu Sep 26, 2019 11:41 am
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

The algorithm should keep oric-compliant images[*] as is. One can check that the total error in the picture is 0 in that case (see highlighted value in screenshot below), meaning that no pixel where harmed during the process. ___ [*] 240x200 pixels, columns 1 to 6 left blank (the algorithm will igno...
by sam
Wed Sep 25, 2019 6:46 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

Actually it isn't the whole picture which optimized, but a single line. This is already a big simplification of the problem since the state-space for a whole picture is (state-space-for-a-line)**200 which is something like 5E+9000 (15**8000) possibilities to test... This is far too big to have real ...
by sam
Tue Sep 24, 2019 7:25 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

Yeah, you are close. Let me summarize the state of the art like this: Basically all oric conversion algorithms are brute force with a bit of optimization. Brute force is something like the following: For each line do: for each of the 40 octet apply one of the following command: use 2 color dithering...
by sam
Thu Sep 12, 2019 11:12 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

@iss: * Convert and internal resize do more or less the same. The difference with the internal version is that it does this in continuous linear-rgb colorspace, preventing issues with gamma-correction. Older version of "convert" do not respect the gamma at all, and newer version quantize the linear ...
by sam
Thu Sep 12, 2019 6:45 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

That's why I usually log in as __sam__, but this forum didn't accept the leading underscore. SamDev is also an option, or Sam/Puls as I am from the Puls demo group. As far as my tests go, the algorithm works nice. Nothing really bad is produced. It is, in the latest version provided above, good enou...
by sam
Thu Sep 12, 2019 2:43 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

Now with the cmd-line version, I can process a lot of pictures and estimate the robustness of the algorithm :D So far, it behaves nicely. Of course some pictures are not a "smooth" as I wanted, but I'm not sure if it is an issue with the algorithm or simply that the picture cannot be "smoothly" appr...
by sam
Wed Sep 11, 2019 11:36 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

Okay, I have made the Lua program work in cmd-line in addition to GrafX2 (yes it can do both). Natively it can read 24bits BMP files without compression, but if you have imagemagick 's convert command in the path[1], it'll be able to process almost any kind of images. For convenience, a fast Lua int...
by sam
Tue Sep 10, 2019 3:12 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

I forgot to translate Chema's avatar, but it is already Oric compatible :) The octopus looks quite nice with the latest slight modification of the algorithm. I tried to compare the result of productions done by IoCero.com, but although I can find the oric pictures he made, I could'nt get the origina...
by sam
Tue Sep 10, 2019 2:04 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

Just for fun :lol:
by sam
Sun Sep 08, 2019 7:14 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

sam wrote:
Sun Sep 08, 2019 6:54 pm
I think I'm getting close to the definitive algorithm. For instance this weekend I get some nice results on heroic-fantasies images with my latest revision of the algorithm.
Yeah, the algorithm works quite well on other type of image as well :D
by sam
Sun Sep 08, 2019 6:54 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

It is too early to make a stand-alone version. This is still W.I.P. and using it in graphX2 is quite handy (undo/redo, support for many file format, etc). I still need to do some research to make the algorithm more robust in order to have images of constant (and predictible) quality. I think I'm get...
by sam
Thu Sep 05, 2019 3:37 pm
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

I've found a new evolution of the algorithm that improves the quality alot on many images but might reduce it on very few ones. I need to work on this, but if anyone is willing to make a Cauldron-like game, here is a picture I recently converted:
by sam
Sat Aug 31, 2019 12:20 am
Forum: Painting tricks
Topic: Pictoric (was: New conversion algorithm)
Replies: 110
Views: 27069

Re: New conversion algorithm

(but I know I can have even better quality) Indeed! Actually using z = 0.9974 - math.exp(-1/z)*0.0152 -- *a^2 in line 424 makes better images (the formula doesn't depend on the intensity of the color anymore). Unfortunately it is too late tonight for me to regenerate the pictures. But here is what ...