Work done

  • WMZ/EMZ importing functionality has been added, WMZ/EMZ/SVGZ exporting functionality has been added.
  • WMZ/EMZ/SVGZ can now be opened and exported normally to/from LibreOffice.
  • CppUnit unit tests were added for each of these cases.
  • PngWrite (our own old png export implementation) was replaced with PngImageWriter which uses libpng.
  • CppUnit unit tests were added for importing→exporting many png files and other various reasons.

There are some other patches for less important work such as removing code duplication.
These patches are included in the list below.

Patch list, newest to oldest

Series of patches to remove format detection code duplication in GraphicDescriptor https://gerrit.libreoffice.org/c/core/+/139274 (PCX)
https://gerrit.libreoffice.org/c/core/+/138936 (Code cleanup)
https://gerrit.libreoffice.org/c/core/+/138847 (PBM/PVM/PGM)
https://gerrit.libreoffice.org/c/core/+/138740 (SVM)
https://gerrit.libreoffice.org/c/core/+/138730 (TIF)
https://gerrit.libreoffice.org/c/core/+/137934 (GIF)
https://gerrit.libreoffice.org/c/core/+/137935 (DXF)
https://gerrit.libreoffice.org/c/core/+/138067 (WMF/EMF)
https://gerrit.libreoffice.org/c/core/+/138069 (XBM)
https://gerrit.libreoffice.org/c/core/+/138070 (XPM)
https://gerrit.libreoffice.org/c/core/+/138102 (SVG)
https://gerrit.libreoffice.org/c/core/+/138189 (PCT)
https://gerrit.libreoffice.org/c/core/+/138207 (PCD)
https://gerrit.libreoffice.org/c/core/+/138208 (EPS)
https://gerrit.libreoffice.org/c/core/+/138209 (TGA)
https://gerrit.libreoffice.org/c/core/+/138210 (MET)
https://gerrit.libreoffice.org/c/core/+/138211 (WEBP)
https://gerrit.libreoffice.org/c/core/+/138212 (RAS)
https://gerrit.libreoffice.org/c/core/+/138216 (BMP)
https://gerrit.libreoffice.org/c/core/+/138226 (PNG)
https://gerrit.libreoffice.org/c/core/+/138227 (PSD)

Remove code duplication in GraphicDescriptor for GIF
Started work on combining GraphicDescriptor and GraphicFormatDetector graphic detection
Add 32bpp export support in PngImageWriter
Use bitmap width instead of scanline size in combineScanlineChannels
Add pHYs PNG chunk export support in PngImageWriter
Add msOG PNG chunk export support in PngImageWriter

Series of patches to replace pngwrite usage with PngImageWriter https://gerrit.libreoffice.org/c/core/+/136936
https://gerrit.libreoffice.org/c/core/+/137114
https://gerrit.libreoffice.org/c/core/+/137115
https://gerrit.libreoffice.org/c/core/+/137116
https://gerrit.libreoffice.org/c/core/+/137117
https://gerrit.libreoffice.org/c/core/+/137118
https://gerrit.libreoffice.org/c/core/+/137122
https://gerrit.libreoffice.org/c/core/+/137123
https://gerrit.libreoffice.org/c/core/+/137124
https://gerrit.libreoffice.org/c/core/+/137125
https://gerrit.libreoffice.org/c/core/+/137130
https://gerrit.libreoffice.org/c/core/+/137131
https://gerrit.libreoffice.org/c/core/+/137132
https://gerrit.libreoffice.org/c/core/+/137133
https://gerrit.libreoffice.org/c/core/+/137134
https://gerrit.libreoffice.org/c/core/+/137135
https://gerrit.libreoffice.org/c/core/+/137136
https://gerrit.libreoffice.org/c/core/+/137137
https://gerrit.libreoffice.org/c/core/+/137138
https://gerrit.libreoffice.org/c/core/+/137139
https://gerrit.libreoffice.org/c/core/+/137140

Add 8 bit palette export support
Add 1 bit palette export support
Finish last weeks patch with all the PngSuite cases testing against size, bit depth, palette and alpha
Add PngSuite files and test that uses them
Finalize previous week SVGZ support patch in Draw
Add support for exporting SVGZ in Writer
Add support for RGBA in the new PNG writer
Add support for exporting EMZ/WMZ
Add support for exporting SVGZ
Add compression support for mbGzLib = true in ZCodec
Add unit tests for ZCodec for both mbGzLib = true/false
Fix regression tdf#149206 caused by my previous patch
Add unit test to prevent similar future regressions
Detect WMF from magic bytes in graphicfilter2

Challenges

Traversing and reading old code was probably the biggest challenge. I have not worked with such a big codebase before so understanding why things are the way they are was also a challenge.

Learnings

This year of GSoC was the one I learned the most about C++, Git and how big open source communities work. I had a lot of fun working on this program which has helped me as a teenager.

Final words

Thanks a lot to my mentor Tomaž Vajngerl. He helped me a lot during the project and always responded to my questions and was overall a great mentor. Also thanks to Miklos Vajna for co-mentoring. The LibreOffice community was very welcoming and helpful as well.

GSoC was an amazing chance to learn and code during the summer. I will definitely continue contributing to LibreOffice. :-)