PresentationApp/imgprovider.go
lordwelch 74fe888188 add remove function
discovered memleak
2016-03-11 14:30:04 -08:00

31 lines
599 B
Go

// imgprovider.go
package main
import (
"image"
"strconv"
)
<<<<<<< Updated upstream
/*var imgproviderstr = `import QtQuick 2.4
Image {
source: "image://images/`*/
var imgready = false
func imgProvider(id string, width, height int) image.Image {
if imgready {
i, _ := strconv.Atoi(id)
return slides[i].getImage(width, height)
} else {
var img1 image.Image = image.NewRGBA(image.Rect(0, 0, 340, 480))
return img1
}
=======
func imgProvider(id string, width, height int) image.Image {
i, _ := strconv.Atoi(id)
return slides[i].getImage(width, height)
>>>>>>> Stashed changes
}