Skip to content

Commit

Permalink
Ensure that the colourspace is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
renchap committed Oct 25, 2024
1 parent 8c35870 commit b51a052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shrine/plugins/blurhash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def extract_with_ruby_vips(io, resize_to)

begin
Shrine.with_file(io) do |file|
image = Vips::Image.new_from_file(file.path, access: :sequential)
image = Vips::Image.new_from_file(file.path, access: :sequential).colourspace(:srgb)
image = image.resize(resize_to.fdiv(image.width), vscale: resize_to.fdiv(image.height)) if resize_to
image = image.flatten if image.has_alpha?

Expand Down

0 comments on commit b51a052

Please sign in to comment.