Shouldn't TPicture.SaveToStreamWithFileExt call TFPImageBitmapClass(GraphicClass).InitializeWriter?
Original Reporter info from Mantis: emaijala
-
Reporter name: Ere Maijala
Original Reporter info from Mantis: emaijala
- Reporter name: Ere Maijala
Description:
I was just debugging an issue where I couldn't save a png image to a stream but always got exception 'Too many colors to use indexed PNG color type' in TFPWriterPNG. So I started looking where FIndexed gets set and found out that TPortableNetworkGraphic.InitializeWriter is never called if I call TImage.Picture.SaveToStreamWithFileExt(S, 'png'). So it tried to save my 24 bit PNG indexed, which failed.
Steps to reproduce:
Run the attached sample project.
Mantis conversion info:
- Mantis ID: 13451
- OS: Win
- OS Build: XP
- Platform: x86
- Version: 0.9.27 (SVN)
- Fixed in version: 0.9.27 (SVN)
- Fixed in revision: 20562 (#8f9838a3)
- Target version: 1.0.0
- LazTarget: 1.0