qlgenerator: refactor WebP code
qlgenerator: refactor Portable pixmap code
remove code dupe