Jump to content

Cortar imagem


Go to solution Solved by JakeBass,

Recommended Posts

Posted

preciso de cortar imagens mas não sei como posicionar a imagem dentro das coordenadas desejadas.

há 4 variaveis que são os pixeis a cortar de cada lado.

o que tenho é o seguinte:

Rectangle cropRect = new Rectangle();
cropRect.Width = src.Width - left_crop - right_crop;
cropRect.Height = src.Height - top_crop - bottom_crop;
Bitmap target = new Bitmap(src, cropRect.Width, cropRect.Height);
Posted (edited)

é cortar, ou "crop"

claro que ao fazer isto a imagem poderá ficar com outras dimensões, mas a resolução(dpi) deve permanecer a mesma.

Edited by sketxz

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.