Merge pull request #378 from kyfk/fix_typo_and_format

Fix typo and apply goimports
master
Tom 4 years ago committed by GitHub
commit 585090af42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,57 +8,57 @@ import "C"
// Common EXIF fields for data extraction
const (
Make = "exif-ifd0-Make"
Model = "exif-ifd0-Model"
Orientation = "exif-ifd0-Orientation"
XResolution = "exif-ifd0-XResolution"
YResolution = "exif-ifd0-YResolution"
ResolutionUnit = "exif-ifd0-ResolutionUnit"
Software = "exif-ifd0-Software"
Datetime = "exif-ifd0-DateTime"
YCbCrPositioning = "exif-ifd0-YCbCrPositioning"
Compression = "exif-ifd1-Compression"
ExposureTime = "exif-ifd2-ExposureTime"
FNumber = "exif-ifd2-FNumber"
ExposureProgram = "exif-ifd2-ExposureProgram"
ISOSpeedRatings = "exif-ifd2-ISOSpeedRatings"
ExifVersion = "exif-ifd2-ExifVersion"
DateTimeOriginal = "exif-ifd2-DateTimeOriginal"
DateTimeDigitized = "exif-ifd2-DateTimeDigitized"
Make = "exif-ifd0-Make"
Model = "exif-ifd0-Model"
Orientation = "exif-ifd0-Orientation"
XResolution = "exif-ifd0-XResolution"
YResolution = "exif-ifd0-YResolution"
ResolutionUnit = "exif-ifd0-ResolutionUnit"
Software = "exif-ifd0-Software"
Datetime = "exif-ifd0-DateTime"
YCbCrPositioning = "exif-ifd0-YCbCrPositioning"
Compression = "exif-ifd1-Compression"
ExposureTime = "exif-ifd2-ExposureTime"
FNumber = "exif-ifd2-FNumber"
ExposureProgram = "exif-ifd2-ExposureProgram"
ISOSpeedRatings = "exif-ifd2-ISOSpeedRatings"
ExifVersion = "exif-ifd2-ExifVersion"
DateTimeOriginal = "exif-ifd2-DateTimeOriginal"
DateTimeDigitized = "exif-ifd2-DateTimeDigitized"
ComponentsConfiguration = "exif-ifd2-ComponentsConfiguration"
ShutterSpeedValue = "exif-ifd2-ShutterSpeedValue"
ApertureValue = "exif-ifd2-ApertureValue"
BrightnessValue = "exif-ifd2-BrightnessValue"
ExposureBiasValue = "exif-ifd2-ExposureBiasValue"
MeteringMode = "exif-ifd2-MeteringMode"
Flash = "exif-ifd2-Flash"
FocalLength = "exif-ifd2-FocalLength"
SubjectArea = "exif-ifd2-SubjectArea"
MakerNote = "exif-ifd2-MakerNote"
SubSecTimeOriginal = "exif-ifd2-SubSecTimeOriginal"
SubSecTimeDigitized = "exif-ifd2-SubSecTimeDigitized"
ColorSpace = "exif-ifd2-ColorSpace"
PixelXDimension = "exif-ifd2-PixelXDimension"
PixelYDimension = "exif-ifd2-PixelYDimension"
SensingMethod = "exif-ifd2-SensingMethod"
SceneType = "exif-ifd2-SceneType"
ExposureMode = "exif-ifd2-ExposureMode"
WhiteBalance = "exif-ifd2-WhiteBalance"
FocalLengthIn35mmFilm = "exif-ifd2-FocalLengthIn35mmFilm"
SceneCaptureType = "exif-ifd2-SceneCaptureType"
GPSLatitudeRef = "exif-ifd3-GPSLatitudeRef"
GPSLatitude = "exif-ifd3-GPSLatitude"
GPSLongitudeRef = "exif-ifd3-GPSLongitudeRef"
GPSLongitude = "exif-ifd3-GPSLongitude"
GPSAltitudeRef = "exif-ifd3-GPSAltitudeRef"
GPSAltitude = "exif-ifd3-GPSAltitude"
GPSSpeedRef = "exif-ifd3-GPSSpeedRef"
GPSSpeed = "exif-ifd3-GPSSpeed"
GPSImgDirectionRef = "exif-ifd3-GPSImgDirectionRef"
GPSImgDirection = "exif-ifd3-GPSImgDirection"
GPSDestBearingRef = "exif-ifd3-GPSDestBearingRef"
GPSDestBearing = "exif-ifd3-GPSDestBearing"
GPSDateStamp = "exif-ifd3-GPSDateStamp"
ShutterSpeedValue = "exif-ifd2-ShutterSpeedValue"
ApertureValue = "exif-ifd2-ApertureValue"
BrightnessValue = "exif-ifd2-BrightnessValue"
ExposureBiasValue = "exif-ifd2-ExposureBiasValue"
MeteringMode = "exif-ifd2-MeteringMode"
Flash = "exif-ifd2-Flash"
FocalLength = "exif-ifd2-FocalLength"
SubjectArea = "exif-ifd2-SubjectArea"
MakerNote = "exif-ifd2-MakerNote"
SubSecTimeOriginal = "exif-ifd2-SubSecTimeOriginal"
SubSecTimeDigitized = "exif-ifd2-SubSecTimeDigitized"
ColorSpace = "exif-ifd2-ColorSpace"
PixelXDimension = "exif-ifd2-PixelXDimension"
PixelYDimension = "exif-ifd2-PixelYDimension"
SensingMethod = "exif-ifd2-SensingMethod"
SceneType = "exif-ifd2-SceneType"
ExposureMode = "exif-ifd2-ExposureMode"
WhiteBalance = "exif-ifd2-WhiteBalance"
FocalLengthIn35mmFilm = "exif-ifd2-FocalLengthIn35mmFilm"
SceneCaptureType = "exif-ifd2-SceneCaptureType"
GPSLatitudeRef = "exif-ifd3-GPSLatitudeRef"
GPSLatitude = "exif-ifd3-GPSLatitude"
GPSLongitudeRef = "exif-ifd3-GPSLongitudeRef"
GPSLongitude = "exif-ifd3-GPSLongitude"
GPSAltitudeRef = "exif-ifd3-GPSAltitudeRef"
GPSAltitude = "exif-ifd3-GPSAltitude"
GPSSpeedRef = "exif-ifd3-GPSSpeedRef"
GPSSpeed = "exif-ifd3-GPSSpeed"
GPSImgDirectionRef = "exif-ifd3-GPSImgDirectionRef"
GPSImgDirection = "exif-ifd3-GPSImgDirection"
GPSDestBearingRef = "exif-ifd3-GPSDestBearingRef"
GPSDestBearing = "exif-ifd3-GPSDestBearing"
GPSDateStamp = "exif-ifd3-GPSDateStamp"
)
// ImageSize represents the image width and height values
@ -77,62 +77,62 @@ type ImageMetadata struct {
Space string
Colourspace string
Size ImageSize
EXIF EXIF
EXIF EXIF
}
// EXIF image metadata
type EXIF struct {
Make string
Model string
Orientation int
XResolution string
YResolution string
ResolutionUnit int
Software string
Datetime string
YCbCrPositioning int
Compression int
ExposureTime string
FNumber string
ExposureProgram int
ISOSpeedRatings int
ExifVersion string
DateTimeOriginal string
DateTimeDigitized string
Make string
Model string
Orientation int
XResolution string
YResolution string
ResolutionUnit int
Software string
Datetime string
YCbCrPositioning int
Compression int
ExposureTime string
FNumber string
ExposureProgram int
ISOSpeedRatings int
ExifVersion string
DateTimeOriginal string
DateTimeDigitized string
ComponentsConfiguration string
ShutterSpeedValue string
ApertureValue string
BrightnessValue string
ExposureBiasValue string
MeteringMode int
Flash int
FocalLength string
SubjectArea string
MakerNote string
SubSecTimeOriginal string
SubSecTimeDigitized string
ColorSpace int
PixelXDimension int
PixelYDimension int
SensingMethod int
SceneType string
ExposureMode int
WhiteBalance int
FocalLengthIn35mmFilm int
SceneCaptureType int
GPSLatitudeRef string
GPSLatitude string
GPSLongitudeRef string
GPSLongitude string
GPSAltitudeRef string
GPSAltitude string
GPSSpeedRef string
GPSSpeed string
GPSImgDirectionRef string
GPSImgDirection string
GPSDestBearingRef string
GPSDestBearing string
GPSDateStamp string
ShutterSpeedValue string
ApertureValue string
BrightnessValue string
ExposureBiasValue string
MeteringMode int
Flash int
FocalLength string
SubjectArea string
MakerNote string
SubSecTimeOriginal string
SubSecTimeDigitized string
ColorSpace int
PixelXDimension int
PixelYDimension int
SensingMethod int
SceneType string
ExposureMode int
WhiteBalance int
FocalLengthIn35mmFilm int
SceneCaptureType int
GPSLatitudeRef string
GPSLatitude string
GPSLongitudeRef string
GPSLongitude string
GPSAltitudeRef string
GPSAltitude string
GPSSpeedRef string
GPSSpeed string
GPSImgDirectionRef string
GPSImgDirection string
GPSDestBearingRef string
GPSDestBearing string
GPSDateStamp string
}
// Size returns the image size by width and height pixels.
@ -185,57 +185,57 @@ func Metadata(buf []byte) (ImageMetadata, error) {
Space: vipsSpace(image),
Type: ImageTypeName(imageType),
EXIF: EXIF{
Make: vipsExifStringTag(image, Make),
Model: vipsExifStringTag(image, Model),
Orientation: orientation,
XResolution: vipsExifStringTag(image, XResolution),
YResolution: vipsExifStringTag(image, YResolution),
ResolutionUnit: vipsExifIntTag(image, ResolutionUnit),
Software: vipsExifStringTag(image, Software),
Datetime: vipsExifStringTag(image, Datetime),
YCbCrPositioning: vipsExifIntTag(image, YCbCrPositioning),
Compression: vipsExifIntTag(image, Compression),
ExposureTime: vipsExifStringTag(image, ExposureTime),
FNumber: vipsExifStringTag(image, FNumber),
ExposureProgram: vipsExifIntTag(image, ExposureProgram),
ISOSpeedRatings: vipsExifIntTag(image, ISOSpeedRatings),
ExifVersion: vipsExifStringTag(image, ExifVersion),
DateTimeOriginal: vipsExifStringTag(image, DateTimeOriginal),
DateTimeDigitized: vipsExifStringTag(image, DateTimeDigitized),
Make: vipsExifStringTag(image, Make),
Model: vipsExifStringTag(image, Model),
Orientation: orientation,
XResolution: vipsExifStringTag(image, XResolution),
YResolution: vipsExifStringTag(image, YResolution),
ResolutionUnit: vipsExifIntTag(image, ResolutionUnit),
Software: vipsExifStringTag(image, Software),
Datetime: vipsExifStringTag(image, Datetime),
YCbCrPositioning: vipsExifIntTag(image, YCbCrPositioning),
Compression: vipsExifIntTag(image, Compression),
ExposureTime: vipsExifStringTag(image, ExposureTime),
FNumber: vipsExifStringTag(image, FNumber),
ExposureProgram: vipsExifIntTag(image, ExposureProgram),
ISOSpeedRatings: vipsExifIntTag(image, ISOSpeedRatings),
ExifVersion: vipsExifStringTag(image, ExifVersion),
DateTimeOriginal: vipsExifStringTag(image, DateTimeOriginal),
DateTimeDigitized: vipsExifStringTag(image, DateTimeDigitized),
ComponentsConfiguration: vipsExifStringTag(image, ComponentsConfiguration),
ShutterSpeedValue: vipsExifStringTag(image, ShutterSpeedValue),
ApertureValue: vipsExifStringTag(image, ApertureValue),
BrightnessValue: vipsExifStringTag(image, BrightnessValue),
ExposureBiasValue: vipsExifStringTag(image, ExposureBiasValue),
MeteringMode: vipsExifIntTag(image, MeteringMode),
Flash: vipsExifIntTag(image, Flash),
FocalLength: vipsExifStringTag(image, FocalLength),
SubjectArea: vipsExifStringTag(image, SubjectArea),
MakerNote: vipsExifStringTag(image, MakerNote),
SubSecTimeOriginal: vipsExifStringTag(image, SubSecTimeOriginal),
SubSecTimeDigitized: vipsExifStringTag(image, SubSecTimeDigitized),
ColorSpace: vipsExifIntTag(image, ColorSpace),
PixelXDimension: vipsExifIntTag(image, PixelXDimension),
PixelYDimension: vipsExifIntTag(image, PixelYDimension),
SensingMethod: vipsExifIntTag(image, SensingMethod),
SceneType: vipsExifStringTag(image, SceneType),
ExposureMode: vipsExifIntTag(image, ExposureMode),
WhiteBalance: vipsExifIntTag(image, WhiteBalance),
FocalLengthIn35mmFilm: vipsExifIntTag(image, FocalLengthIn35mmFilm),
SceneCaptureType: vipsExifIntTag(image, SceneCaptureType),
GPSLatitudeRef: vipsExifStringTag(image, GPSLatitudeRef),
GPSLatitude: vipsExifStringTag(image, GPSLatitude),
GPSLongitudeRef: vipsExifStringTag(image, GPSLongitudeRef),
GPSLongitude: vipsExifStringTag(image, GPSLongitude),
GPSAltitudeRef: vipsExifStringTag(image, GPSAltitudeRef),
GPSAltitude: vipsExifStringTag(image, GPSAltitude),
GPSSpeedRef: vipsExifStringTag(image, GPSSpeedRef),
GPSSpeed: vipsExifStringTag(image, GPSSpeed),
GPSImgDirectionRef: vipsExifStringTag(image, GPSImgDirectionRef),
GPSImgDirection: vipsExifStringTag(image, GPSImgDirection),
GPSDestBearingRef: vipsExifStringTag(image, GPSDestBearingRef),
GPSDestBearing: vipsExifStringTag(image, GPSDestBearing),
GPSDateStamp: vipsExifStringTag(image, GPSDateStamp),
ShutterSpeedValue: vipsExifStringTag(image, ShutterSpeedValue),
ApertureValue: vipsExifStringTag(image, ApertureValue),
BrightnessValue: vipsExifStringTag(image, BrightnessValue),
ExposureBiasValue: vipsExifStringTag(image, ExposureBiasValue),
MeteringMode: vipsExifIntTag(image, MeteringMode),
Flash: vipsExifIntTag(image, Flash),
FocalLength: vipsExifStringTag(image, FocalLength),
SubjectArea: vipsExifStringTag(image, SubjectArea),
MakerNote: vipsExifStringTag(image, MakerNote),
SubSecTimeOriginal: vipsExifStringTag(image, SubSecTimeOriginal),
SubSecTimeDigitized: vipsExifStringTag(image, SubSecTimeDigitized),
ColorSpace: vipsExifIntTag(image, ColorSpace),
PixelXDimension: vipsExifIntTag(image, PixelXDimension),
PixelYDimension: vipsExifIntTag(image, PixelYDimension),
SensingMethod: vipsExifIntTag(image, SensingMethod),
SceneType: vipsExifStringTag(image, SceneType),
ExposureMode: vipsExifIntTag(image, ExposureMode),
WhiteBalance: vipsExifIntTag(image, WhiteBalance),
FocalLengthIn35mmFilm: vipsExifIntTag(image, FocalLengthIn35mmFilm),
SceneCaptureType: vipsExifIntTag(image, SceneCaptureType),
GPSLatitudeRef: vipsExifStringTag(image, GPSLatitudeRef),
GPSLatitude: vipsExifStringTag(image, GPSLatitude),
GPSLongitudeRef: vipsExifStringTag(image, GPSLongitudeRef),
GPSLongitude: vipsExifStringTag(image, GPSLongitude),
GPSAltitudeRef: vipsExifStringTag(image, GPSAltitudeRef),
GPSAltitude: vipsExifStringTag(image, GPSAltitude),
GPSSpeedRef: vipsExifStringTag(image, GPSSpeedRef),
GPSSpeed: vipsExifStringTag(image, GPSSpeed),
GPSImgDirectionRef: vipsExifStringTag(image, GPSImgDirectionRef),
GPSImgDirection: vipsExifStringTag(image, GPSImgDirection),
GPSDestBearingRef: vipsExifStringTag(image, GPSDestBearingRef),
GPSDestBearing: vipsExifStringTag(image, GPSDestBearing),
GPSDateStamp: vipsExifStringTag(image, GPSDateStamp),
},
}

@ -95,125 +95,125 @@ func TestEXIF(t *testing.T) {
return
}
files := map[string]EXIF {
"test.jpg": {},
files := map[string]EXIF{
"test.jpg": {},
"exif/Landscape_1.jpg": {
Orientation: 1,
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Orientation: 1,
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
YCbCrPositioning: 1,
ExifVersion: "Exif Version 2.1",
ColorSpace: 65535,
ExifVersion: "Exif Version 2.1",
ColorSpace: 65535,
},
"test_exif.jpg": {
Make: "Jolla",
Model: "Jolla",
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Orientation: 1,
Datetime: "2014:09:21 16:00:56",
ExposureTime: "1/25",
FNumber: "12/5",
ISOSpeedRatings: 320,
ExifVersion: "Exif Version 2.3",
DateTimeOriginal: "2014:09:21 16:00:56",
"test_exif.jpg": {
Make: "Jolla",
Model: "Jolla",
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Orientation: 1,
Datetime: "2014:09:21 16:00:56",
ExposureTime: "1/25",
FNumber: "12/5",
ISOSpeedRatings: 320,
ExifVersion: "Exif Version 2.3",
DateTimeOriginal: "2014:09:21 16:00:56",
ShutterSpeedValue: "205447286/44240665",
ApertureValue: "334328577/132351334",
ApertureValue: "334328577/132351334",
ExposureBiasValue: "0/1",
MeteringMode: 1,
Flash: 0,
FocalLength: "4/1",
WhiteBalance: 1,
ColorSpace: 65535,
MeteringMode: 1,
Flash: 0,
FocalLength: "4/1",
WhiteBalance: 1,
ColorSpace: 65535,
},
"test_exif_canon.jpg": {
Make: "Canon",
Model: "Canon EOS 40D",
Orientation: 1,
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Software: "GIMP 2.4.5",
Datetime: "2008:07:31 10:38:11",
YCbCrPositioning: 2,
Compression: 6,
ExposureTime: "1/160",
FNumber: "71/10",
ExposureProgram: 1,
ISOSpeedRatings: 100,
ExifVersion: "Exif Version 2.21",
DateTimeOriginal: "2008:05:30 15:56:01",
DateTimeDigitized: "2008:05:30 15:56:01",
Make: "Canon",
Model: "Canon EOS 40D",
Orientation: 1,
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Software: "GIMP 2.4.5",
Datetime: "2008:07:31 10:38:11",
YCbCrPositioning: 2,
Compression: 6,
ExposureTime: "1/160",
FNumber: "71/10",
ExposureProgram: 1,
ISOSpeedRatings: 100,
ExifVersion: "Exif Version 2.21",
DateTimeOriginal: "2008:05:30 15:56:01",
DateTimeDigitized: "2008:05:30 15:56:01",
ComponentsConfiguration: "Y Cb Cr -",
ShutterSpeedValue: "483328/65536",
ApertureValue: "368640/65536",
ExposureBiasValue: "0/1",
MeteringMode: 5,
Flash: 9,
FocalLength: "135/1",
SubSecTimeOriginal: "00",
SubSecTimeDigitized: "00",
ColorSpace: 1,
PixelXDimension: 100,
PixelYDimension: 68,
ExposureMode: 1,
WhiteBalance: 0,
SceneCaptureType: 0,
ShutterSpeedValue: "483328/65536",
ApertureValue: "368640/65536",
ExposureBiasValue: "0/1",
MeteringMode: 5,
Flash: 9,
FocalLength: "135/1",
SubSecTimeOriginal: "00",
SubSecTimeDigitized: "00",
ColorSpace: 1,
PixelXDimension: 100,
PixelYDimension: 68,
ExposureMode: 1,
WhiteBalance: 0,
SceneCaptureType: 0,
},
"test_exif_full.jpg": {
Make: "Apple",
Model: "iPhone XS",
Orientation: 6,
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Software: "13.3.1",
Datetime: "2020:07:28 19:18:49",
YCbCrPositioning: 1,
Compression: 6,
ExposureTime: "1/835",
FNumber: "9/5",
ExposureProgram: 2,
ISOSpeedRatings: 25,
ExifVersion: "Unknown Exif Version",
DateTimeOriginal: "2020:07:28 19:18:49",
DateTimeDigitized: "2020:07:28 19:18:49",
Make: "Apple",
Model: "iPhone XS",
Orientation: 6,
XResolution: "72/1",
YResolution: "72/1",
ResolutionUnit: 2,
Software: "13.3.1",
Datetime: "2020:07:28 19:18:49",
YCbCrPositioning: 1,
Compression: 6,
ExposureTime: "1/835",
FNumber: "9/5",
ExposureProgram: 2,
ISOSpeedRatings: 25,
ExifVersion: "Unknown Exif Version",
DateTimeOriginal: "2020:07:28 19:18:49",
DateTimeDigitized: "2020:07:28 19:18:49",
ComponentsConfiguration: "Y Cb Cr -",
ShutterSpeedValue: "77515/7986",
ApertureValue: "54823/32325",
BrightnessValue: "77160/8623",
ExposureBiasValue: "0/1",
MeteringMode: 5,
Flash: 16,
FocalLength: "17/4",
SubjectArea: "2013 1511 2217 1330",
MakerNote: "1110 bytes undefined data",
SubSecTimeOriginal: "777",
SubSecTimeDigitized: "777",
ColorSpace: 65535,
PixelXDimension: 4032,
PixelYDimension: 3024,
SensingMethod: 2,
SceneType: "Directly photographed",
ExposureMode: 0,
WhiteBalance: 0,
FocalLengthIn35mmFilm: 26,
SceneCaptureType: 0,
GPSLatitudeRef: "N",
GPSLatitude: "55/1 43/1 5287/100",
GPSLongitudeRef: "E",
GPSLongitude: "37/1 35/1 5571/100",
GPSAltitudeRef: "Sea level",
GPSAltitude: "90514/693",
GPSSpeedRef: "K",
GPSSpeed: "114272/41081",
GPSImgDirectionRef: "M",
GPSImgDirection: "192127/921",
GPSDestBearingRef: "M",
GPSDestBearing: "192127/921",
GPSDateStamp: "2020:07:28",
ShutterSpeedValue: "77515/7986",
ApertureValue: "54823/32325",
BrightnessValue: "77160/8623",
ExposureBiasValue: "0/1",
MeteringMode: 5,
Flash: 16,
FocalLength: "17/4",
SubjectArea: "2013 1511 2217 1330",
MakerNote: "1110 bytes undefined data",
SubSecTimeOriginal: "777",
SubSecTimeDigitized: "777",
ColorSpace: 65535,
PixelXDimension: 4032,
PixelYDimension: 3024,
SensingMethod: 2,
SceneType: "Directly photographed",
ExposureMode: 0,
WhiteBalance: 0,
FocalLengthIn35mmFilm: 26,
SceneCaptureType: 0,
GPSLatitudeRef: "N",
GPSLatitude: "55/1 43/1 5287/100",
GPSLongitudeRef: "E",
GPSLongitude: "37/1 35/1 5571/100",
GPSAltitudeRef: "Sea level",
GPSAltitude: "90514/693",
GPSSpeedRef: "K",
GPSSpeed: "114272/41081",
GPSImgDirectionRef: "M",
GPSImgDirection: "192127/921",
GPSDestBearingRef: "M",
GPSDestBearing: "192127/921",
GPSDateStamp: "2020:07:28",
},
}

@ -62,11 +62,11 @@ type Angle int
const (
// D0 represents the rotation angle 0 degrees.
D0 Angle = 0
// D45 represents the rotation angle 90 degrees.
// D45 represents the rotation angle 45 degrees.
D45 Angle = 45
// D90 represents the rotation angle 90 degrees.
D90 Angle = 90
// D135 represents the rotation angle 90 degrees.
// D135 represents the rotation angle 135 degrees.
D135 Angle = 135
// D180 represents the rotation angle 180 degrees.
D180 Angle = 180
@ -74,7 +74,7 @@ const (
D235 Angle = 235
// D270 represents the rotation angle 270 degrees.
D270 Angle = 270
// D315 represents the rotation angle 180 degrees.
// D315 represents the rotation angle 315 degrees.
D315 Angle = 315
)
@ -227,7 +227,7 @@ type Options struct {
InputICC string
Palette bool
// Speed defines the AVIF encoders CPU effort. Valid values are 0-8.
Speed int
Speed int
// private fields
autoRotateOnly bool

@ -105,8 +105,8 @@ func TestVipsAutoRotate(t *testing.T) {
}
files := []struct {
name string
orientation int
name string
orientation int
}{
{"test.jpg", 0},
{"test_exif.jpg", 0},

Loading…
Cancel
Save