Skip to content

Commit

Permalink
Merge pull request #342 from shellfu/Issue-341
Browse files Browse the repository at this point in the history
Align raylib-go ExportImage with C Library Behavior
  • Loading branch information
gen2brain authored Jan 16, 2024
2 parents 483e94e + 1f80c1e commit 49aab27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions raylib/rtextures.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ func UpdateTextureRec(texture Texture2D, rec Rectangle, pixels []color.RGBA) {
}

// ExportImage - Export image as a PNG file
func ExportImage(image Image, fileName string) {
func ExportImage(image Image, fileName string) bool {
cfileName := C.CString(fileName)
defer C.free(unsafe.Pointer(cfileName))
cimage := image.cptr()
C.ExportImage(*cimage, cfileName)
return bool(C.ExportImage(*cimage, cfileName))
}

// ExportImageToMemory - Export image to memory buffer
Expand Down

0 comments on commit 49aab27

Please sign in to comment.