-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
When I load tested this code, memory usage kept growing and wasn't freed.
func MakeImageFirstPage(file []byte, DPI float64) (image.Image, error) {
doc, err := fitz.NewFromMemory(file)
if err != nil {
return nil, fmt.Errorf("%w: %w", ErrInvalidFile, err)
}
defer doc.Close()
img, err := doc.ImageDPI(0, DPI)
if err != nil {
return nil, fmt.Errorf("%w: %w", ErrImageCreation, err)
}
return img, nil
}
I really need your help because I'm so bad at CGO.
Metadata
Metadata
Assignees
Labels
No labels