Skip to content

Commit

Permalink
Return image.RGBA
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Sep 27, 2024
1 parent 324b56c commit a6aa83e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fitz.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ func (f *Document) NumPage() int {
}

// Image returns image for given page number.
func (f *Document) Image(pageNumber int) (image.Image, error) {
func (f *Document) Image(pageNumber int) (*image.RGBA, error) {
return f.ImageDPI(pageNumber, 300.0)
}

// ImageDPI returns image for given page number and DPI.
func (f *Document) ImageDPI(pageNumber int, dpi float64) (image.Image, error) {
func (f *Document) ImageDPI(pageNumber int, dpi float64) (*image.RGBA, error) {
f.mtx.Lock()
defer f.mtx.Unlock()

Expand Down

0 comments on commit a6aa83e

Please sign in to comment.