mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
lib/lowleveljpeg: add Abs method, nil checks
This commit is contained in:
1 parent
12b404f58d
commit
f483ef0849
4 files changed
+42
-2
No files matched your search
@@ -46,7 +46,7 @@ func genUpsampleFrom(w *bytes.Buffer) {
|
||||
w.WriteString("//\n")
|
||||
w.WriteString("// It uses a triangle filter.\n")
|
||||
w.WriteString("func (dst *QuadBlockU8) UpsampleFrom(src *BlockU8) {\n")
|
||||
w.WriteString("\tif (dst == nil) || (src == nil) {\n\t\treturn\n\t}\n")
|
||||
w.WriteString("\tif dst == nil {\n\t\treturn\n\t} else if src == nil {\n\t\tdst.SetToNeutral()\n\t\treturn\n\t}\n")
|
||||
for y := 0; y < 16; y++ {
|
||||
for x := 0; x < 16; x++ {
|
||||
d := (y << 4) | x
|
||||
|
||||
Reference in new issue
Block a user