Imprimer une image: Choix de la résolution

comemich Messages postés 39 Date d'inscription jeudi 3 février 2005 Statut Membre Dernière intervention 23 août 2017 - 23 août 2017 à 19:35
cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 - 23 août 2017 à 20:46
Voici mon code pour imprimer une image.
Public BMP As Bitmap

Private Sub MenuImporter_Click(sender As Object, e As EventArgs) Handles MenuImporter.Click
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
BMP = New Bitmap(OpenFileDialog1.FileName)
End If
End Sub

Private Sub MenuImprimer_Click(sender As Object, e As EventArgs) Handles MenuImprimer.Click
PrintDialog1.Document = PrintDocument1
If PrintDialog1.ShowDialog = DialogResult.OK Then PrintDocument1.Print()
End Sub

Private Sub PrintDocument1_PrintPage(sender As Object, e As PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawImage(BMP, New Point(0, 0))
End Sub


Mais l'imprimante n'imprime que 793x1122 pixels alors que le bitmap que je veux imprimer fait 4960x7015 pixels. En fait, on n'imprime que 96 pixels par pouce alors que l'imprimante est paramétrée à 600 ppp. Les propriétés HorizontalResolution et VerticalResolution du bitmap valent 96 mais elles sont ReadOnly. Comment faire pour imprimer 600 ppp de ce bitmap?

1 réponse

cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 137
23 août 2017 à 20:46
0
Rejoignez-nous