You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the slices exercise doesn't display bluescale image. Instead it displays the slices of slices returned by Pic and as the last line prints "IMAGE: ".
The text was updated successfully, but these errors were encountered:
Are you able to provide a sample program that reproduces this issue? My trivial solution seems to work ok:
package main
import "golang.org/x/tour/pic"
func Pic(dx, dy int) [][]uint8 {
m := make([][]uint8, dy)
for i := range m {
m[i] = make([]uint8, dx)
}
return m
}
func main() {
pic.Show(Pic)
}
I tried running my bit of code again, it turned out that I was debug printing some intermediate values and this was preventing the image from showing up. Removing the print made the image show up. This issue can be closed if this behavior is okay.
We should probably figure out a more graceful way of handling intermingling
of image data and debug prints. Yours wouldn't have been the only example.
On 10 February 2016 at 16:17, Karthik Krishnan Ramasubramanian < notifications@github.com> wrote:
I tried running my bit of code again, it turned out that I was debug
printing some intermediate values and this was preventing the image from
showing up. Removing the print made the image show up. This issue can be
closed if this behavior is okay.
—
Reply to this email directly or view it on GitHub #14206 (comment).
adg
changed the title
tour: Running exercise-slices does not display "bluescale" image
tour: figure out how to make pic.Show interact well with debug prints
Mar 21, 2016
Hi @doublek - Can you mention what are the debug statements that you added that was preventing the image from being shown ? A code example would be really appreciated.
Context: https://tour.golang.org/moretypes/15
Running the slices exercise doesn't display bluescale image. Instead it displays the slices of slices returned by Pic and as the last line prints "IMAGE: ".
The text was updated successfully, but these errors were encountered: