fiddly widdly imagey wimagey
This commit is contained in:
parent
d29ebc3d27
commit
3868803ff1
Binary file not shown.
Before Width: | Height: | Size: 293 KiB After Width: | Height: | Size: 753 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 29 KiB |
|
@ -206,7 +206,9 @@ func deriveImage(b []byte, contentType string) (*imageAndMeta, error) {
|
|||
}
|
||||
|
||||
out := &bytes.Buffer{}
|
||||
if err := jpeg.Encode(out, i, nil); err != nil {
|
||||
if err := jpeg.Encode(out, i, &jpeg.Options{
|
||||
Quality: 100,
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -256,7 +258,9 @@ func deriveThumbnail(b []byte, contentType string, x uint, y uint) (*imageAndMet
|
|||
aspect := float64(width) / float64(height)
|
||||
|
||||
out := &bytes.Buffer{}
|
||||
if err := jpeg.Encode(out, thumb, nil); err != nil {
|
||||
if err := jpeg.Encode(out, thumb, &jpeg.Options{
|
||||
Quality: 100,
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &imageAndMeta{
|
||||
|
|
Loading…
Reference in New Issue