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

crop to get black edges #2848

Closed
Leuhan77 opened this issue Dec 2, 2021 · 14 comments
Closed

crop to get black edges #2848

Leuhan77 opened this issue Dec 2, 2021 · 14 comments

Comments

@Leuhan77
Copy link

Leuhan77 commented Dec 2, 2021

Hi, I wanted to know if someone could help me crop the image so that black edges do not appear my screen is 720x1600
Thanks

@rom1v
Copy link
Collaborator

rom1v commented Dec 2, 2021

Refs #548 (comment)

What you want is the mirrored content to have the same aspect ratio as your computer size. To know the crop rectangle, you must know both the device size and your computer screen size.

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

the resolution of my pc screen is 1280x720

@rom1v
Copy link
Collaborator

rom1v commented Dec 2, 2021

So you want to crop the device width of 1600 to 1280, i.e. crop 320 pixels, 160 on the left, 160 on the right:

scrcpy --crop 1280:720:160:0   # 1280x720 at offset (160,0)

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

Captura

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

so I remain :(

@rom1v
Copy link
Collaborator

rom1v commented Dec 2, 2021

Your device is not 1600×720. Is it portrait (720×1600)? What is the output in the console when you start scrcpy-noconsole.bat?

It makes no sense to crop the mirroring so that your portrait device match your landscape computer screen.

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

85

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

This?

@rom1v
Copy link
Collaborator

rom1v commented Dec 2, 2021

OK, so it's 720x1600. It makes no sense to crop 720x1600 it so that it fits in your 1280x720 screen, you'll get only a tiny part of your screen.

Scrcpy just mirrors the device, which is rendered on the phone at phone screen dimensions. You can then crop, but that just crops what is rendered on the phone, it will not magically render at your computer dimensions.

What you want is probably a secondary display: #1413 (comment)

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

Bien, entonces es 720x1600. No tiene sentido recortarlo a 720x1600 para que quepa en su pantalla de 1280x720, realmente solo una pequeña parte de su pantalla.

Scrcpy solo refleja el dispositivo, que se representa en el teléfono con las dimensiones de la pantalla del teléfono. Luego puede recortar, pero eso solo recorta lo que se renderiza en el teléfono, no se renderizará mágicamente en las dimensiones de su computadora.

Lo que desea es probablemente una pantalla secundaria: # 1413 (comentario)

exactly that I tried, but when I start a mock screen and try to open it with scrcpy I only get a black screen

@rom1v
Copy link
Collaborator

rom1v commented Dec 2, 2021

OK, it's often the case on Android 9 (and sometimes on Android 10). So desktop mode will probably not work on your device.

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

I have android 9, I don't have the option to enable desktop mode, but if I can simulate a second screen, is there no way for this to work?

@rom1v
Copy link
Collaborator

rom1v commented Dec 2, 2021

is there no way for this to work?

I don't think so.

@Leuhan77
Copy link
Author

Leuhan77 commented Dec 2, 2021

Well, thanks for the help

@rom1v rom1v closed this as completed Dec 2, 2021
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