Jump to content

Forkanion

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by Forkanion

  1. 10 hours ago, Reptillian said:

    I believe color curve would be the answer here.

    Not sure if this matches. IIRC, C++ and C# are almost as fast each other. So, if euclidean distance is too slow on the C#, it's a safe bet that gmic version use binary search. Let me call @G'MIC.

     

    From a online document:

     

    -index  Given a palette or look-up table of reference colors and a source image, the command determines for each source image pixel, the most closely matching reference color in the palette.

    How do I do the colormap 0 palette maker thing you did on g'mic? I can't find where I can enter that line of code.

  2. 8 hours ago, Reptillian said:

    I have something for you. You can do 'colormap 0' in gmic.

     

    sfSQkzn.png

     

    The right image is all of the unique color found in the first image with the colormap command. I know this is a paint.net thread, but this solution is so much faster for your need and it is pretty specific. I will refer you to discuss.pixls.us if you find this is a good starting point.

    Nevermind anything else, I can match colors to their closest value in the palette myself. I just need to know how to use the colormap command to single out every unique color together, like that cat image. Thanks for everything else you guys have done, I appreciate your time. 

  3.  

    2 minutes ago, MJW said:

     

    Have you not paid attention to the long discussion about the difficulty of matching a huge palette in a reasonable amount of time?

    I was being sent multiple solutions, all of which I wasn't sure how to do, so  I thought the solution was there, I just didn't know how to use it because nobody was being elaborate enough. I've come across a 4096x4096 image which looked like it included every single color, even the grayscale. I'm trying to make an image like that, only with RGB 64 0 255 to RGB 192 0 255, including all the gray colors. Is there a plugin that does that, basically something that gives you every variation of a color range (R: 64 - 192), along with the whole grayscale version of that color range? If that can be done somehow, I can just use that feature, as well.

  4. 7 minutes ago, MJW said:

     

    As I mentioned, there is an algorithm I describe in Fast algorithm for finding the minimum distances to a set that I believe could do the job in a reasonable time. The updated code for the "distance transform"  algorithm is given in a later comment, since for some reason I couldn't update the lead comment. The "set pixels" mentioned in the algorithm correspond the the colors that are present in the palette image. The algorithm would need to be extended from two dimensions to three, to handle the three color components. I'm confident that would fairly straightforward -- it's just applying the second stage in the algorithm again in the other direction.

     

    Once the Nearest Color table is build, the colors in the second image could be replaced just by indexing into the table and fetching the color. Each entry in the 256x256x256 table is the nearest palette color.

     

    I'd be happy to help anyone who wants to try it, but I'm not inclined to do it myself. It seems like quite a lot of work for a very limited audience. I can't imagine why anyone would want to use a palette of 14 million color.

    I actually already have the palette in the form of a .txt file, because of the "MakePalette" plugin tool, I now just need  to use it as a palette for another image. 

     

    My Ultimate goal is to "purplify" this image.image.thumb.png.09c3cab58c566f7368e46df11ce52a40.pngthe color palette I'm using actually appears to have only have 1 million unique colors, but I can't use any Paint.NET plugin to basically round up the closest purple to each of the colors you see in that image. I'm trying to convert each color to it's nearest value in those 1 million purples.

  5. 1 minute ago, MJW said:

     

    I thought the point was to find the nearest matching color. Finding the unique colors is pretty easy, I think. Just construct a linear bit-array of length 256x256x256. Then go through the image colors, setting the bit corresponding to (B << 16| G << 8 | R).

    I'm trying to succeed at finding all unique colors. and THEN applying it as a palette, to another image.

  6. 42 minutes ago, Reptillian said:

    @MJW Could it be possible to alter clipboard or send to clipboard? I think I know how to do it in C# or I feel like I can do it though you'll beat me to it if this was a race.

     

    3D integer array of size 256,256,256 would be int[,,] arr = new int[256,256,256]; or something like this. And then, a dynamic array of RGB color is as simple as either ColorBRGA list or the equivalent of list for integer array of size 3. After the dynamic array has been generated from the 3D integer array, the problem of @Forkanion would be solved. I however don't know what he wants to do with said palette.

     

    @Forkanion Do you want it as a file?

    Sure, expect I feel I wouldn't know how to use that since this is my first time using GIMP.

  7. 21 minutes ago, Reptillian said:

    I have something for you. You can do 'colormap 0' in gmic.

     

    sfSQkzn.png

     

    The right image is all of the unique color found in the first image with the colormap command. I know this is a paint.net thread, but this solution is so much faster for your need and it is pretty specific. I will refer you to discuss.pixls.us if you find this is a good starting point.

    Wow, that seems very helpful. How would I be able to use that to apply it to an image and use it as its palette? 

  8. 14 hours ago, Ego Eram Reputo said:

    Hey there @Forkanion - Welcome to the forum :)

     

    Conditional Hue & Saturation plugin is the answer.

     

    CH-S-demo.png

     

    To see how easy it is to do this type of effect, check out this post: https://forums.getpaint.net/topic/21134-how-can-i-create-a-shape-and-recolor-it/?do=findComment&comment=348884

    Is there a version of this software (or even a way) to make it fade vertically? I tried angling the object to try and make the fade look diagonal when I angle it back to before, but that cuts out a good majority of the fade.

  9. Let's say, I want to make an american dollar bill look rainbowy. I would take a spectrum rainbow the size of the dollar bill, layer it on top of the bill, and use multiply or overlay, but that changes the saturation and brightness of the colors of the bill instead of directly converting the entire bill's hue into a rainbow. The point is, I only want the hue of every pixel of the bill to change into a rainbow gradient, not the saturation and brightness. How do I do this?

×
×
  • Create New...