GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — imgproxy/processing/import_color_profile.go at master · pushd/imgproxy Expand file tree/ Copy pathimport_color_profile.goMore file actions 37 lines (30 loc) · 909 Bytes / Copy pathimport_color_profile.goFile metadata and controls37 lines (30 loc) · 909 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 package processing import ( "github.com/imgproxy/imgproxy/v3/config" "github.com/imgproxy/imgproxy/v3/imagedata" "github.com/imgproxy/imgproxy/v3/options" "github.com/imgproxy/imgproxy/v3/vips" ) func importColorProfile(pctx *pipelineContext, img *vips.Image, po *options.ProcessingOptions, imgdata *imagedata.ImageData) error { if pctx.iccImported { return nil } if err := img.Rad2Float(); err != nil { return err } convertToLinear := config.UseLinearColorspace && (pctx.wscale != 1 || pctx.hscale != 1) if img.IsLinear() { // The image is linear. If we keep its ICC, we'll get wrong colors after // converting it to sRGB img.RemoveColourProfile() } else if convertToLinear || !img.IsRGB() { if err := img.ImportColourProfile(); err != nil { return err } pctx.iccImported = true } if convertToLinear { return img.LinearColourspace() } return img.RgbColourspace() } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |