Skip to content

Commit e9d3e50

Browse files
committed
fix jpg colorspace changes breaking preview
1 parent ddea303 commit e9d3e50

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

internal/command/images.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,9 @@ func (args *Args) JpegPhoto() {
887887
// 6,334B with gaussianBlur and quality at 90.
888888
// 8,824B with no gaussianBlur config and quality at 75.
889889
// 9,234B with no gaussianBlur config and quality at 90.
890-
const jpegQuality = "90"
891-
const gaussian = true
890+
const jpegQuality = "75"
891+
const gaussian = false
892+
fmt.Println("doing the photo thing")
892893
// Strip the image of any profiles and comments.
893894
const strip = "-strip"
894895
*args = append(*args, strip)
@@ -900,9 +901,10 @@ func (args *Args) JpegPhoto() {
900901
gaussianBlur := []string{"-gaussian-blur", "0.05"}
901902
*args = append(*args, gaussianBlur...)
902903
}
904+
// NOTE: Oct-25, this has been disabled as it breaks certain images causing them to be far too.
903905
// Set the image colorspace.
904-
colorspace := []string{"-colorspace", "RGB"}
905-
*args = append(*args, colorspace...)
906+
//colorspace := []string{"-colorspace", "RGB"}
907+
//*args = append(*args, colorspace...)
906908
}
907909

908910
// PortablePixel appends the command line arguments for the convert command to transform an image into args PNG image.
@@ -952,7 +954,7 @@ func (args *Args) Thumbnail() {
952954
func (args *Args) CWebp() {
953955
// Auto-filter will spend additional time optimizing the
954956
// filtering strength to reach args well-balanced quality.
955-
const af = "-af"
957+
const af = "-lossless" //"-af"
956958
*args = append(*args, af)
957959
// Preserve RGB values in transparent area. The default is off, to help compressibility.
958960
const exact = "-exact"

0 commit comments

Comments
 (0)