Skip to content

Commit

Permalink
Merge pull request #89 from metanorma/image-resize-vectory
Browse files Browse the repository at this point in the history
Use #image_resize from vectory
  • Loading branch information
opoudjis authored Jan 31, 2024
2 parents d4310c4 + 8e68cc5 commit 30076f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions html2doc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "thread_safe"
spec.add_dependency "uuidtools"
spec.add_dependency "unitsml"
spec.add_dependency "vectory", "~> 0.6"

spec.add_development_dependency "debug"
spec.add_development_dependency "equivalent-xml", "~> 0.6"
Expand Down
6 changes: 3 additions & 3 deletions lib/html2doc/mime.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "uuidtools"
require "base64"
require "mime/types"
require "image_size"
require "fileutils"
require "vectory"

class Html2Doc
def mime_preamble(boundary, filename, result)
Expand Down Expand Up @@ -98,9 +98,9 @@ def image_cleanup(docxml, dir, localdir)
local_filename = rename_image(i, dir, localdir)
i["width"], i["height"] =
if landscape?(i)
Metanorma::Utils.image_resize(i, local_filename, maxwidth, maxheight)
Vectory.image_resize(i, local_filename, maxwidth, maxheight)
else
Metanorma::Utils.image_resize(i, local_filename, maxheight, maxwidth)
Vectory.image_resize(i, local_filename, maxheight, maxwidth)
end
end
docxml
Expand Down

0 comments on commit 30076f8

Please sign in to comment.