sphere2cubeGo icon indicating copy to clipboard operation
sphere2cubeGo copied to clipboard

When the panorama is too large, function 'Worker' it will throw error

Open uglyer opened this issue 6 years ago • 3 comments

Hello, this function is to read the picture repeatedly, and when the panorama is too large, it will lead to running. Can be optimized, just read once and then go. will be run faster.

originalPixels, err := worker.GetPixels(reader)

if err != nil {
	panic(err)
	os.Exit(2)
}
log.Printf("read file: %v  ---> finished", originalImagePath)

for _, tileName := range tileNames {
	tile := worker.Tile{TileName: tileName, TileSize: tileSize}
	go worker.Worker(originalPixels, tile, cacheResult, originalImagePath, done)
}

And how to slove sawtooth

image

image

uglyer avatar Mar 29 '18 08:03 uglyer

This is very helpful, the attached patch worked perfectly and i can now open bigger files without issues.

segovia-no avatar Nov 09 '23 16:11 segovia-no

Hey @uglyer @segovia-no sounds very reasonable, could you make a PR? I would be happy to merge it then

flash286 avatar Nov 13 '23 11:11 flash286

@flash286 Any news on the PR review attached? Greetings.

segovia-no avatar Mar 14 '24 21:03 segovia-no