question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[WEB] ImageManipulator doesn't resize canvas when generating image

See original GitHub issue

🐛 Bug Report

Summary of Issue

When using ImageManipulator to edit images on web, the canvas is not resized.

Environment

Only happens on web

Reproducible Demo

for (let i = 0; i < sliceCount; i++) {
      const originX = sliceWidth * i;

      const crop = await ImageManipulator.manipulateAsync(
        selectedImage.uri,
        [
          {
            crop: {
              originX,
              originY: 0,
              width: sliceWidth,
              height: selectedImage.height,
            },
          },
        ],
        { compress: 1, format: ImageManipulator.SaveFormat.JPEG, base64: isWeb }
      );
}
broken screenshot

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brentvatnecommented, Mar 11, 2021

#12021 has landed and will be available in sdk 41. thanks @rSkogeby!

1reaction
rSkogebycommented, Feb 24, 2021

I have a proposed solution for this in https://github.com/expo/expo/pull/12021.

Read more comments on GitHub >

github_iconTop Results From Across the Web

can't really resize a canvas image - Stack Overflow
The answer consists of two steps : The first (as Kaiido suggests) is making use of the extended syntax of drawImage() taking the ......
Read more >
ImageManipulator - Expo Documentation
Manipulate the image provided via uri . Available modifications are rotating, flipping (mirroring), resizing and cropping. Each invocation results in a new file ......
Read more >
Module Page Image Manipulator | API for 1 & 2 - ProcessWire
The Page Image Manipulator is a module that let you in a first place do ... Besides the GD-filterfunctions it contains resize, crop,...
Read more >
Displayables — Ren'Py Documentation
A displayable that resizes an image to fill the available area, while preserving the width and height of its borders. It is often...
Read more >
expo-image-manipulator | Yarn - Package Manager
expo-image-manipulator. Provides functions that let you manipulation images on the local file system, eg: resize, crop.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found