diff --git a/vips/foreign.c b/vips/foreign.c index 23f9d27d..10b6b883 100644 --- a/vips/foreign.c +++ b/vips/foreign.c @@ -526,7 +526,7 @@ static SaveParams defaultSaveParams = { .stripMetadata = FALSE, .jpegOptimizeCoding = FALSE, - .jpegSubsample = VIPS_FOREIGN_JPEG_SUBSAMPLE_ON, + .jpegSubsample = VIPS_FOREIGN_SUBSAMPLE_ON, .jpegTrellisQuant = FALSE, .jpegOvershootDeringing = FALSE, .jpegOptimizeScans = FALSE, diff --git a/vips/foreign.go b/vips/foreign.go index e291faa5..cfa4dddd 100644 --- a/vips/foreign.go +++ b/vips/foreign.go @@ -19,10 +19,10 @@ type SubsampleMode int // SubsampleMode enum correlating to libvips subsample modes const ( - VipsForeignSubsampleAuto SubsampleMode = C.VIPS_FOREIGN_JPEG_SUBSAMPLE_AUTO - VipsForeignSubsampleOn SubsampleMode = C.VIPS_FOREIGN_JPEG_SUBSAMPLE_ON - VipsForeignSubsampleOff SubsampleMode = C.VIPS_FOREIGN_JPEG_SUBSAMPLE_OFF - VipsForeignSubsampleLast SubsampleMode = C.VIPS_FOREIGN_JPEG_SUBSAMPLE_LAST + VipsForeignSubsampleAuto SubsampleMode = C.VIPS_FOREIGN_SUBSAMPLE_AUTO + VipsForeignSubsampleOn SubsampleMode = C.VIPS_FOREIGN_SUBSAMPLE_ON + VipsForeignSubsampleOff SubsampleMode = C.VIPS_FOREIGN_SUBSAMPLE_OFF + VipsForeignSubsampleLast SubsampleMode = C.VIPS_FOREIGN_SUBSAMPLE_LAST ) // ImageType represents an image type @@ -358,7 +358,7 @@ func vipsSaveJPEGToBuffer(in *C.VipsImage, params JpegExportParams) ([]byte, err p.quality = C.int(params.Quality) p.interlace = C.int(boolToInt(params.Interlace)) p.jpegOptimizeCoding = C.int(boolToInt(params.OptimizeCoding)) - p.jpegSubsample = C.VipsForeignJpegSubsample(params.SubsampleMode) + p.jpegSubsample = C.VipsForeignSubsample(params.SubsampleMode) p.jpegTrellisQuant = C.int(boolToInt(params.TrellisQuant)) p.jpegOvershootDeringing = C.int(boolToInt(params.OvershootDeringing)) p.jpegOptimizeScans = C.int(boolToInt(params.OptimizeScans)) @@ -467,7 +467,7 @@ func vipsSaveJP2KToBuffer(in *C.VipsImage, params Jp2kExportParams) ([]byte, err p.jp2kLossless = C.int(boolToInt(params.Lossless)) p.jp2kTileWidth = C.int(params.TileWidth) p.jp2kTileHeight = C.int(params.TileHeight) - p.jpegSubsample = C.VipsForeignJpegSubsample(params.SubsampleMode) + p.jpegSubsample = C.VipsForeignSubsample(params.SubsampleMode) return vipsSaveToBuffer(p) } diff --git a/vips/foreign.h b/vips/foreign.h index 836f1df0..e54b946c 100644 --- a/vips/foreign.h +++ b/vips/foreign.h @@ -84,7 +84,7 @@ typedef struct SaveParams { // JPEG BOOL jpegOptimizeCoding; - VipsForeignJpegSubsample jpegSubsample; + VipsForeignSubsample jpegSubsample; BOOL jpegTrellisQuant; BOOL jpegOvershootDeringing; BOOL jpegOptimizeScans;