Avoid temporaries to save some cycles.
Multiply instead of dividing
Add benchmarks to compare execution times.

Run "go test -bench LargeJpegThumb" to benchmark all functions at once.