Closed ockam closed 10 years ago
Just found the problem: I’m running imagoptim.
Made several tests and discovered that the PNG generated are OK when viewed on the desktop (OS X) or in a browser, but if you open them in Photoshop, you see a darker image. The same image you get if you run it through image_optim.
I presume there is something with the way PNG are saved in favicon_maker. I’m running imagemagick 6.8.7-7 and looking at the code, they should be sRGB, which is correct.
I have no clue on what to look for...
I've noticed the same issue, but it gets weirder: after running several times, I've noticed the icons keep getting darker every time.
@ockam Du you still have the problem. If yes, I have experienced the same or a similar problem and discovered the cause for it. The setup of favicon_maker is such that it changes the colorcode by default (RGB->sRGB) for imagemagick >= v6.8.0. If you are interested in more detail, look here.
@minusfive That your pictures are getting darker is not explained by the change in colorcode. It rather sounds as if you are in some kind of loop. Below I am posting the setup from my middleman
config.rb
-File. With this I keep my templates outside the source
folder in a folder that I call favicons
. Maybe it helps...
activate :favicon_maker do |f|
f.template_dir = File.join(root, 'favicons')
f.icons = {
"favicon_template.png" => [
{ icon: "apple-touch-icon-152x152-precomposed.png" },
{ icon: "apple-touch-icon-144x144-precomposed.png" },
{ icon: "apple-touch-icon-120x120-precomposed.png" },
{ icon: "apple-touch-icon-114x114-precomposed.png" },
{ icon: "apple-touch-icon-76x76-precomposed.png" },
{ icon: "apple-touch-icon-72x72-precomposed.png" },
{ icon: "apple-touch-icon-precomposed.png", size: "72x72" },
{ icon: "favicon.png", size: "16x16" },
{ icon: "favicon.ico", size: "32x32,16x16" },
],
"tile_template.png" => [
{ icon: "tile.png", size: "558x558" }
],
"tile-wide_template.png" => [
{ icon: "tile-wide.png", size: "558x270" }
]
}
end
The colorspace conversion has been removed, as didn't seem necessary anymore. Try v3.6
that I just released which uses a reworked FaviconMaker
version.
Problem solved. Thanks!
Great!
I’m generating a simple set of icons from a 24 bits PNG. Here’s my config:
All png are a lot darker than the original, except for the ico file which is correct.
I tried changing my original to 32 bits, sRGB without success.