Posts tagged with png

  • Generate PNG barcode

    Apr 21, 2018

    How to generate PNG barcodes in Java using the zxing library:

  • Dynamic PNG Image Generation with ASP.NET

    Jun 25, 2010

    I had created a small web app in MonoDevelop that created a png image on the fly. Porting the app to Windows .NET 3.5 with Visual Studio 2008 was almost painless, but it did include two unexpected incident. The first one was… well the app didn’t run anymore, showing the dreadful “A generic error occured in GDI+”. A bit of a research lead to this article here. Apparently the problem occurs only with PNG images. The stream that you write the generated image to needs to be seekable and I guess in Mono the Response.OutputStream is seekable but in .NET it’s not. The solution is to use an intermediate MemoryStream to write the image to and then dump that stream on Response.OutputStream.

This site uses third party cookies from Google Analytics and Google AdSense Accept and close popup