build(deps): bump golang.org/x/image from 0.36.0 to 0.38.0

Bumps [golang.org/x/image](https://github.com/golang/image) from 0.36.0 to 0.38.0.
- [Commits](https://github.com/golang/image/compare/v0.36.0...v0.38.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2026-04-07 14:46:25 +00:00
committed by Ralf Haferkamp
parent c9a41a4bfd
commit 4c86d2a289
5 changed files with 22 additions and 23 deletions

2
go.mod
View File

@@ -105,7 +105,7 @@ require (
go.opentelemetry.io/otel/trace v1.42.0
golang.org/x/crypto v0.49.0
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
golang.org/x/image v0.36.0
golang.org/x/image v0.38.0
golang.org/x/net v0.52.0
golang.org/x/oauth2 v0.36.0
golang.org/x/sync v0.20.0

4
go.sum
View File

@@ -1383,8 +1383,8 @@ golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.36.0 h1:Iknbfm1afbgtwPTmHnS2gTM/6PPZfH+z2EFuOkSbqwc=
golang.org/x/image v0.36.0/go.mod h1:YsWD2TyyGKiIX1kZlu9QfKIsQ4nAAK9bdgdrIsE7xy4=
golang.org/x/image v0.38.0 h1:5l+q+Y9JDC7mBOMjo4/aPhMDcxEptsX+Tt3GgRQRPuE=
golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

View File

@@ -4,7 +4,10 @@
package tiff
import "io"
import (
"io"
"slices"
)
// buffer buffers an io.Reader to satisfy io.ReaderAt.
type buffer struct {
@@ -12,24 +15,19 @@ type buffer struct {
buf []byte
}
const fillChunkSize = 10 << 20 // 10 MB
// fill reads data from b.r until the buffer contains at least end bytes.
func (b *buffer) fill(end int) error {
m := len(b.buf)
if end > m {
if end > cap(b.buf) {
newcap := 1024
for newcap < end {
newcap *= 2
}
newbuf := make([]byte, end, newcap)
copy(newbuf, b.buf)
b.buf = newbuf
} else {
b.buf = b.buf[:end]
}
if n, err := io.ReadFull(b.r, b.buf[m:end]); err != nil {
end = m + n
b.buf = b.buf[:end]
for m < end {
next := min(end-m, fillChunkSize)
b.buf = slices.Grow(b.buf, next)
b.buf = b.buf[:m+next]
n, err := io.ReadFull(b.r, b.buf[m:m+next])
m += n
b.buf = b.buf[:m]
if err != nil {
return err
}
}
@@ -44,7 +42,8 @@ func (b *buffer) ReadAt(p []byte, off int64) (int, error) {
}
err := b.fill(end)
return copy(p, b.buf[o:end]), err
end = min(end, len(b.buf))
return copy(p, b.buf[min(o, end):end]), err
}
// Slice returns a slice of the underlying buffer. The slice contains

View File

@@ -103,7 +103,7 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {
return m, image.Config{}, nil
case fccVP8L:
if wantAlpha || alpha != nil {
if alpha != nil {
return nil, image.Config{}, errInvalidFormat
}
if configOnly {

4
vendor/modules.txt vendored
View File

@@ -2447,8 +2447,8 @@ golang.org/x/exp/slices
golang.org/x/exp/slog
golang.org/x/exp/slog/internal
golang.org/x/exp/slog/internal/buffer
# golang.org/x/image v0.36.0
## explicit; go 1.24.0
# golang.org/x/image v0.38.0
## explicit; go 1.25.0
golang.org/x/image/bmp
golang.org/x/image/ccitt
golang.org/x/image/font