Twinside / Rasterific

A drawing engine in Haskell
BSD 3-Clause "New" or "Revised" License
140 stars 11 forks source link

Image renders blurry with thick black border #15

Closed jeffreyrosenbluth closed 10 years ago

jeffreyrosenbluth commented 10 years ago
import Codec.Picture
import Graphics.Rasterific

main :: IO ()
main = do
  (Right (ImageRGBA8 png)) <- readImage "pledge-button.png"
  let img = drawImage png 0 (V2 0 0)
      white = PixelRGBA8 255 255 255 255
      d = renderDrawing 389 89 white img
  writePng "yourimage.png" d

image read in:

pledge-button

output:

yourimage

joeyh commented 10 years ago

I think that the black border is just a change in the displayed transparent background color. I don't think it's related to the blurriness, which is the issue I am having when reading and then writing this image in Diagrams. At least when using diagrams and rasterific, the transparent background comes back out still transparent, so that's ok.

Twinside commented 10 years ago

So I've fixed the bluriness issue, for the opacity, it's a problem related to the png loader; I'm transfering the ticket to Juicy.Pixels

jeffreyrosenbluth commented 10 years ago

Thanks,x