-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Issue Description
The PNG backend is generating files with ASCII text content instead of proper binary PNG image data. This causes all PNG images in documentation to be broken and non-functional.
Problem Details
- PNG files are being created but contain ASCII text instead of binary PNG image data
- Example:
curlshows PNG files are "ASCII text" instead of "PNG image data" - The
filecommand shows "ASCII text" instead of "PNG image data" - HTML img tags are correct but images don't load because they're text files
- PDF files work correctly (binary content), but PNG files are broken
Evidence
# PNG files return HTTP 200 but contain text content
curl -I https://lazy-fortran.github.io/fortplot/plots/basic_plot.png
# Shows Content-Type: text/plain instead of image/png
file plots/basic_plot.png
# Shows "ASCII text" instead of "PNG image data"Impact
- All documentation images are broken, making visual examples non-functional
- Users cannot see plot examples in the documentation
- Severely impacts user experience and documentation quality
Root Cause
The PNG backend is likely writing text output instead of proper binary PNG data, possibly due to:
- Incorrect file mode (text vs binary)
- Wrong output format in PNG generation code
- Backend configuration issues
Acceptance Criteria
- PNG files contain proper binary PNG image data
-
filecommand shows "PNG image data" for generated PNG files - PNG images display correctly in web browsers
- Documentation images load and display properly
- HTTP Content-Type headers are correct for PNG files
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working