Skip to content

fix #1051 Converting PNGs to JPEG#1052

Merged
miketaylr merged 1 commit intowebcompat:masterfrom
karlcow:1051/1
May 19, 2016
Merged

fix #1051 Converting PNGs to JPEG#1052
miketaylr merged 1 commit intowebcompat:masterfrom
karlcow:1051/1

Conversation

@karlcow
Copy link
Copy Markdown
Member

@karlcow karlcow commented May 19, 2016

r? @miketaylr

This convert the PNG to JPEG for optimizing the size and the time, and bypass the issue with PNG poor encoding performances.
This is not necessary to integrate. but it would be worth testing at least. This is a simple fix following up my tests in #1051

Comment thread webcompat/api/uploads.py
if self.image_object.format in ['JPEG', 'JPG', 'JPE', 'PNG']:
save_parameters['optimize'] = True
# Convert PNG to JPEG. See issue #1051
file_dest = 'jpg'.join(file_dest.rsplit('png', 1))

This comment was marked as abuse.

This comment was marked as abuse.

@miketaylr
Copy link
Copy Markdown
Member

I think we should go for it -- I'll merge and test on staging.

@miketaylr miketaylr merged commit 1fd891e into webcompat:master May 19, 2016
Comment thread webcompat/api/uploads.py
@@ -86,6 +86,8 @@ def save(self):
# Optimize further the image compression for these formats
if self.image_object.format in ['JPEG', 'JPG', 'JPE', 'PNG']:

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants