use png instead of jpg for thumbnail

This commit is contained in:
Jakub Trllo 2024-05-23 10:26:06 +02:00
parent afb385e72f
commit e91c46ad83
2 changed files with 7 additions and 7 deletions

View file

@ -21,7 +21,7 @@ from ayon_core.lib.transcoding import VIDEO_EXTENSIONS
class ExtractThumbnail(pyblish.api.InstancePlugin):
"""Create jpg thumbnail from sequence using ffmpeg"""
"""Create png thumbnail from sequence using ffmpeg"""
label = "Extract Thumbnail"
order = pyblish.api.ExtractorOrder + 0.49
@ -197,7 +197,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
self.log.debug("input {}".format(full_input_path))
filename = os.path.splitext(input_file)[0]
jpeg_file = filename + "_thumb.jpg"
jpeg_file = filename + "_thumb.png"
full_output_path = os.path.join(dst_staging, jpeg_file)
colorspace_data = repre.get("colorspaceData")
@ -260,12 +260,12 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
new_repre = {
"name": repre_name,
"ext": "jpg",
"ext": "png",
"files": jpeg_file,
"stagingDir": dst_staging,
"thumbnail": True,
"tags": new_repre_tags,
# If source image is jpg then there can be clash when
# If source image is png then there can be clash when
# integrating to making the output name explicit.
"outputName": "thumbnail"
}

View file

@ -26,7 +26,7 @@ from ayon_core.lib import (
class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
"""Create jpg thumbnail for instance based on 'thumbnailSource'.
"""Create png thumbnail for instance based on 'thumbnailSource'.
Thumbnail source must be a single image or video filepath.
"""
@ -61,7 +61,7 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
dst_staging, dst_filename = os.path.split(dst_filepath)
new_repre = {
"name": "thumbnail",
"ext": "jpg",
"ext": "png",
"files": dst_filename,
"stagingDir": dst_staging,
"thumbnail": True,
@ -101,7 +101,7 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
self.log.debug("Thumbnail source: {}".format(thumbnail_source))
src_basename = os.path.basename(thumbnail_source)
dst_filename = os.path.splitext(src_basename)[0] + "_thumb.jpg"
dst_filename = os.path.splitext(src_basename)[0] + "_thumb.png"
full_output_path = os.path.join(dst_staging, dst_filename)
if oiio_supported: