Fill each pixel color to a set of same quantity shapes

Hi, all. This is my stage:

I have a jpg image ten pixel wide and ten same size (pixel) boxes.

I would like to get each pixel color and aply it to each box on a sequence.

I tried to do it recording a macro but when I changed the image I got the colors of the previus image.

I feel this wouldn't be to much dificult but I havent enogh knowleg to do it.

Any help please.

Thanks in advance.

Parents Reply
  • Well my friend. This is not exactly what I'm trying to do now, but with this you answered one of my other questions https://community.coreldraw.com/sdk/f/corel-photo-paint-api/55655/get-pixel-data. So if you dont mind I would like some help with that (I downloaded colorcount from  github but I have no succes to manage .csj files on X5).

    My problem here is how to make the color values change with every picture.

    Sub copyAll()
        ' Recorded 22/4/2021
        ActivePage.Layers("Tabla").Visible = True
        ActivePage.Layers("Tabla").Editable = True
        ActivePage.Layers("Tabla").Shapes(408).Fill.UniformColor.RGBAssign 122, 73, 15
        ActivePage.Layers("Tabla").Shapes(407).Fill.UniformColor.RGBAssign 122, 73, 15
        ActivePage.Layers("Tabla").Shapes(406).Fill.UniformColor.RGBAssign 115, 72, 15
        ActivePage.Layers("Tabla").Shapes(405).Fill.UniformColor.RGBAssign 118, 73, 15
        ActivePage.Layers("Tabla").Shapes(404).Fill.UniformColor.RGBAssign 58, 71, 25
        ActivePage.Layers("Tabla").Shapes(403).Fill.UniformColor.RGBAssign 100, 37, 19
        ActivePage.Layers("Tabla").Shapes(402).Fill.UniformColor.RGBAssign 116, 75, 79
        ActivePage.Layers("Tabla").Shapes(401).Fill.UniformColor.RGBAssign 119, 72, 15
        ActivePage.Layers("Tabla").Shapes(400).Fill.UniformColor.RGBAssign 119, 74, 17
        ActivePage.Layers("Tabla").Shapes(399).Fill.UniformColor.RGBAssign 121, 129, 9
        ActivePage.Layers("Tabla").Shapes(398).Fill.UniformColor.RGBAssign 118, 72, 19
        ActivePage.Layers("Tabla").Shapes(397).Fill.UniformColor.RGBAssign 219, 131, 33
        ActivePage.Layers("Tabla").Shapes(396).Fill.UniformColor.RGBAssign 113, 75, 12
        ActivePage.Layers("Tabla").Shapes(395).Fill.UniformColor.RGBAssign 148, 95, 103
        ActivePage.Layers("Tabla").Shapes(394).Fill.UniformColor.RGBAssign 120, 97, 79
        ActivePage.Layers("Tabla").Shapes(393).Fill.UniformColor.RGBAssign 120, 71, 12
        ActivePage.Layers("Tabla").Shapes(392).Fill.UniformColor.RGBAssign 101, 37, 21
    End Sub

    With this approach I have fixed values and when I change the picture the color values doesn't change acording to the new one.

Children
No Data