Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running the example gives: ### StateError: Bad state: Generated image width did not match original image width. #2

Closed
hansbak opened this issue May 13, 2021 · 3 comments

Comments

@hansbak
Copy link

hansbak commented May 13, 2021

if i run the example on Ubuntu linux I get the following result:

......
2021-05-13 13:14:04.019907 INFO process_screenshots - Processing images in Directory: 'metadata/android/en-US'
2021-05-13 13:14:04.026042 FINE process_screenshots - Rendering samsungapps-samsung-galaxy-s10-plus-appbar_menu with title: Example title 👍️ (SWEAT) and Frame{name: Samsung Galaxy S10, orientation: Orientation.portrait, offsetX: 41, offsetY: 71, width: 1440, image: File: '/home/dell/frameit-frames/latest/Samsung Galaxy S10 Prism Green.png'}
2021-05-13 13:14:05.631993 SEVERE frame - Error while creating frames.

StateError: Bad state: Generated image width did not match original image width. Wrong device pixel ratio? was: 720 expected: 1440 ratio: 2.0

#0 FrameProcess._processScreenshot (package:frameit_chrome/src/frame_process.dart:235:9)

#1 FrameProcess.processScreenshots (package:frameit_chrome/src/frame_process.dart:91:24)

#2 runFrame (file:///home/dell/.pub-cache/hosted/pub.dartlang.org/frameit_chrome-1.0.0/bin/frameit_chrome.dart:125:5)

#3 main (file:///home/dell/.pub-cache/hosted/pub.dartlang.org/frameit_chrome-1.0.0/bin/frameit_chrome.dart:61:5)

any suggestions?

@hpoul
Copy link
Contributor

hpoul commented May 13, 2021

Read the error message.. and then configure the pixel ratio..

@hpoul hpoul closed this as completed May 13, 2021
@hpoul
Copy link
Contributor

hpoul commented May 13, 2021

Check the --help of the command, it should be --pixel-ratio iirc

@hansbak
Copy link
Author

hansbak commented May 13, 2021

Thanks for quick help, and the package itself. Could not make the help command to work, however looked in the source...

So the command line in the example needs to have the following parameter added: --pixel-ratio=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants