MCPcopy
hub / github.com/willnorris/imageproxy / transform

Method transform

data.go:143–145  ·  view source on GitHub ↗

transform returns whether o includes transformation options. Some fields are not transform related at all (like Signature), and others only apply in the presence of other fields (like Fit). A non-empty Format value is assumed to involve a transformation.

()

Source from the content-addressed store, hash-verified

141// the presence of other fields (like Fit). A non-empty Format value is
142// assumed to involve a transformation.
143func (o Options) transform() bool {
144 return o.Width != 0 || o.Height != 0 || o.Rotate != 0 || o.FlipHorizontal || o.FlipVertical || o.Quality != 0 || o.Format != "" || o.CropX != 0 || o.CropY != 0 || o.CropWidth != 0 || o.CropHeight != 0 || o.Trim
145}
146
147// ParseOptions parses str as a list of comma separated transformation options.
148// The options can be specified in in order, with duplicate options overwriting

Callers 1

TransformFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected