Awesome! :)
Piotr, Unfortunately I've stopped maintaining this library years ago, and will not be able to look into this. I'm happy you found a workaround, though! It's possible there's some PHP error being output which corrupts the images. You'd see this by viewing actual character data of the response. You could also analyze the HTTP headers and network response size to give you a clue for how do the two methods above differ. Cheers!
Sanath, which version are you running? There is a bug with output() in the latest...
Flavio, PNG doesn't have quality, only compression. Quote from WideImage doc: Note:...