Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imagemagickを抹殺 #2143

Merged
merged 41 commits into from
Dec 11, 2023
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
955bc1b
reimplement gif resize func with pure go
logica0419 Dec 7, 2023
841930d
delete imagemagick utils
logica0419 Dec 7, 2023
8ab4114
using ErrInvalidImageSrc
logica0419 Dec 7, 2023
6e61063
remove redundant error
logica0419 Dec 7, 2023
cbcab23
delete imagemagick path from every config
logica0419 Dec 7, 2023
4b6339b
return error in convert util
logica0419 Dec 8, 2023
afc37e2
make variable names understandable
logica0419 Dec 9, 2023
eba7e4f
fix render gif
logica0419 Dec 9, 2023
b6fae9b
fix bound calculation
logica0419 Dec 9, 2023
fd2f92f
rename vars
logica0419 Dec 9, 2023
250cf6e
using imaging package
logica0419 Dec 9, 2023
0daa012
round coordinates
logica0419 Dec 10, 2023
e9ddab2
resize composite frame
logica0419 Dec 10, 2023
74ab087
write comments
logica0419 Dec 10, 2023
c925749
initialize Image slice
logica0419 Dec 10, 2023
719a37e
delete imagemagick from Dockerfile
logica0419 Dec 10, 2023
e907dbf
parallelize animated gif resize
logica0419 Dec 10, 2023
2185fc8
power up concurrency
logica0419 Dec 10, 2023
8b1431d
put out type definition
logica0419 Dec 10, 2023
0c8d8b0
rename package alias
logica0419 Dec 10, 2023
78f085a
prepare IoReaderToBytes util
logica0419 Dec 10, 2023
33ddae6
add gif testdata
logica0419 Dec 10, 2023
708fc5f
write test for FitAnimationGIF
logica0419 Dec 10, 2023
d13c886
add testcases
logica0419 Dec 10, 2023
3471bbf
changed implementation
logica0419 Dec 10, 2023
113444a
moved MustOpenGif to testutils
logica0419 Dec 10, 2023
9e684a5
write test for GifToBytesReader
logica0419 Dec 10, 2023
cebe6bd
parallelize test
logica0419 Dec 10, 2023
4b7a666
fix test naming
logica0419 Dec 10, 2023
662751b
Revert "power up concurrency"
logica0419 Dec 10, 2023
4302fa8
fix concurrency limit setting
logica0419 Dec 10, 2023
257fa13
not testing concurrency pattern
logica0419 Dec 11, 2023
6cb6c02
support disposal method
logica0419 Dec 11, 2023
3f0350d
using only free images in testing
logica0419 Dec 11, 2023
3f2c8d9
replace buggy image
logica0419 Dec 11, 2023
80932b2
replace names
logica0419 Dec 11, 2023
5e061b4
fix test file names & files
logica0419 Dec 11, 2023
fa38f02
refactor resize goroutine starting
logica0419 Dec 11, 2023
53cc3d9
use deep copy to avoid
logica0419 Dec 11, 2023
80ec7b5
moved type definition readability
logica0419 Dec 11, 2023
95c6d03
use io.ReadAll & lo.Must
logica0419 Dec 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
delete imagemagick utils
logica0419 committed Dec 8, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
diegoferigo Diego Ferigo
commit 841930d7e292905d5d33aea4db8af9812fe6c5e5
6 changes: 1 addition & 5 deletions router/utils/process_image.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ import (
"github.com/traPtitech/traQ/router/extension/herror"
"github.com/traPtitech/traQ/service/file"
imaging2 "github.com/traPtitech/traQ/service/imaging"
"github.com/traPtitech/traQ/utils/imaging"
)

const (
@@ -71,7 +70,7 @@ func saveUploadImage(p imaging2.Processor, c echo.Context, m file.Manager, name
}

// PNGに変換
var b = bytes.Buffer{}
b := bytes.Buffer{}
if err := png.Encode(&b, img); err != nil {
return uuid.Nil, herror.InternalServerError(err)
}
@@ -86,9 +85,6 @@ func saveUploadImage(p imaging2.Processor, c echo.Context, m file.Manager, name
b, err := p.FitAnimationGIF(src, maxImageSize, maxImageSize)
if err != nil {
switch err {
case imaging.ErrImageMagickUnavailable:
// gifは一時的にサポートされていない
return uuid.Nil, herror.BadRequest("gif file is temporarily unsupported")
case imaging2.ErrInvalidImageSrc, imaging2.ErrTimeout:
// 不正なgifである
return uuid.Nil, herror.BadRequest(badImage)
99 changes: 0 additions & 99 deletions utils/imaging/imagemagick.go

This file was deleted.

163 changes: 0 additions & 163 deletions utils/imaging/imagemagick_test.go

This file was deleted.