@Falstaff:
Compare? I can implement a function to check the binary same only. Did you mean that?
for example:
img1 = 1x1 pixel with pixel color = RGB(255-000-000)
img2 = 1x1 pixel with pixel color = RGB(000-000-255)
img3 = 1x1 pixel with pixel color = RGB(000-000-255)
img1.Compare(img2) should return false
but
img2.Compare(img3) should return true
?
it's for optimizing my color scheme background from cover, for now, i'm just grab a pixel, i'd like to take 3 or 6 pixels and compare how many are equals to know what's the best color to use ...
FYI, here is my function to get an overaly image that match with the cover to fill the area on the left of the cover
function getOverlayColorScheme(image) {
// get pixel
var pixel_img = gdi.CreateImage(1, 1);
var gb = pixel_img.GetGraphics();
gb.DrawImage(image, -2, Math.floor(image.Width/2)*-1, image.Width, image.Height, 0, 0, image.Width, image.Height, 0, 255);
pixel_img.ReleaseGraphics(gb);
// draw & fill a box with this pixel color, used after as an overlay image with .Resize method to fit the area to overlay
var box_img = gdi.CreateImage(2, 2);
gb = box_img.GetGraphics();
for(var j=0; j<2; j++) {
for(var i=0; i<2; i++) {
gb.DrawImage(pixel_img, i, j, 1, 1, 0, 0, 1, 1, 0, 255);
}
}
box_img.ReleaseGraphics(gb);
return box_img;
}