TotalColors changes after Resize

May 26, 2015 at 8:25 AM
Hi,

I assume this is a bug.... I have an AI file that has 59 Colors, after a Resize this will increase to 33702
var settings = new MagickReadSettings {Density = new PointD(150)};

                using (var image = new MagickImage(FileName, settings)) {
                    var totalColors = image.TotalColors;
                    image.Resize(1024, 1024);
                    var totalColors2 = image.TotalColors;
                    image.Format = MagickFormat.Jpg;
                    filePath = ....
                    image.Write(filePath);
                }
Coordinator
May 26, 2015 at 10:54 AM
Edited May 26, 2015 at 10:55 AM
Can you attach a link to your image? It is possible that this is happening because of resize. It will increase the number of colors but this sounds a bit excessive.
May 26, 2015 at 11:45 AM
Coordinator
May 26, 2015 at 10:02 PM
This looks correct. You should zoom in on the wheels of the bike and you can already see a lot of different colors because of the resize. And with the Histogram method you will be able to get a count for all the different colors.