optimise images for smaller size

This commit is contained in:
Dmitry Verkhoturov
2022-02-24 16:18:28 -06:00
committed by Umputun
parent d4481d145f
commit cfb7361adf
12 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ func TestFsStore_SaveNoResizeJpeg(t *testing.T) {
t.Log(imgPath)
data, err := os.ReadFile(imgPath)
assert.NoError(t, err)
assert.Equal(t, 23983, len(data))
assert.Equal(t, 16756, len(data))
}
func TestFsStore_SaveAndCommit(t *testing.T) {
+1 -1
View File
@@ -48,7 +48,7 @@ func TestService_ResizeJpeg(t *testing.T) {
img, err := readAndValidateImage(fh, 32000)
assert.NoError(t, err)
assert.Equal(t, 23983, len(img))
assert.Equal(t, 16756, len(img))
img = resize(img, 400, 300)
assert.Equal(t, 10918, len(img))
Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 KiB

After

Width:  |  Height:  |  Size: 274 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 B

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 14 KiB