mirror of
				https://github.com/imgproxy/imgproxy.git
				synced 2025-10-30 23:08:02 +02:00 
			
		
		
		
	TransformColourProfile -> TransformColourProfileToSRGB
This commit is contained in:
		| @@ -36,7 +36,7 @@ func colorspaceToResult(pctx *pipelineContext, img *vips.Image, po *options.Proc | ||||
| 	} else if !keepProfile { | ||||
| 		// We don't import ICC profile and don't want to keep it, | ||||
| 		// so we need to transform it to sRGB for maximum compatibility | ||||
| 		if err := img.TransformColourProfile(); err != nil { | ||||
| 		if err := img.TransformColourProfileToSRGB(); err != nil { | ||||
| 			return err | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -546,7 +546,7 @@ vips_icc_export_srgb(VipsImage *in, VipsImage **out) | ||||
| } | ||||
|  | ||||
| int | ||||
| vips_icc_transform_go(VipsImage *in, VipsImage **out) | ||||
| vips_icc_transform_srgb(VipsImage *in, VipsImage **out) | ||||
| { | ||||
|   return vips_icc_transform(in, out, "sRGB", "embedded", TRUE, "pcs", vips_icc_get_pcs(in), NULL); | ||||
| } | ||||
|   | ||||
| @@ -853,7 +853,7 @@ func (img *Image) ExportColourProfileToSRGB() error { | ||||
| 	return nil | ||||
| } | ||||
|  | ||||
| func (img *Image) TransformColourProfile() error { | ||||
| func (img *Image) TransformColourProfileToSRGB() error { | ||||
| 	var tmp *C.VipsImage | ||||
|  | ||||
| 	// Don't transform is there's no embedded profile or embedded profile is sRGB | ||||
| @@ -863,10 +863,10 @@ func (img *Image) TransformColourProfile() error { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	if C.vips_icc_transform_go(img.VipsImage, &tmp) == 0 { | ||||
| 	if C.vips_icc_transform_srgb(img.VipsImage, &tmp) == 0 { | ||||
| 		C.swap_and_clear(&img.VipsImage, tmp) | ||||
| 	} else { | ||||
| 		log.Warningf("Can't transform ICC profile: %s", Error()) | ||||
| 		log.Warningf("Can't transform ICC profile to sRGB: %s", Error()) | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
|   | ||||
| @@ -59,7 +59,7 @@ int vips_icc_restore(VipsImage *in, VipsImage **out); | ||||
| int vips_icc_import_go(VipsImage *in, VipsImage **out); | ||||
| int vips_icc_export_go(VipsImage *in, VipsImage **out); | ||||
| int vips_icc_export_srgb(VipsImage *in, VipsImage **out); | ||||
| int vips_icc_transform_go(VipsImage *in, VipsImage **out); | ||||
| int vips_icc_transform_srgb(VipsImage *in, VipsImage **out); | ||||
| int vips_icc_remove(VipsImage *in, VipsImage **out); | ||||
| int vips_colourspace_go(VipsImage *in, VipsImage **out, VipsInterpretation cs); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user