Autor Beitrag
Lihlu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: Fr 17.03.17 11:39 
Hallo zusammen,

für einen Spiele Abend versuche ich ein Program zu programmieren.

Es soll so funktionieren.

1. Man nimmt ein Bild und lädt es in die Picture Box hoch.
2. Nun soll das Programm das Bild unscharf machen (oder verpixeln).
3. Ein Timer soll langsam das Bild scharf stellen.

Sinn der Sache ist - wer als erster erät was es ist, hat gewonnen.

Leider hab ich überhaupt keinen Plan ob das mit C# überhaupt möglich ist.
Bestimmte Settings in einer PictureBox habe ich nicht gefunden.

Wie würdet ihr das ganze machen ?

Freue mich auf eure Antworten :D
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Fr 17.03.17 12:20 
Hallo,

suchst du so etwas wie Normal Pixelate? Das ergab meine Suche im Internet nach "C# pixelate image".

Hier noch weitere Links:
Creating Pixelated Images in C#
Pixelate an image with c#
What's a good pixelation algorithm in C# .NET?

Für diesen Beitrag haben gedankt: Lihlu
Lihlu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: Fr 17.03.17 12:23 
Ja genau sowas suche ich :)

Wie bekomme ich dies auf eine PictureBox angewendet ? So wie es aussieht nimmt er aus dem Beispiel Code einen Pfad auf der Festplatte.

Vielen lieben dank
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Fr 17.03.17 12:27 
Es verwendet einfach eine interne Bitmap. Woher diese kommt ist völlig gleich.
Du kannst auch einfach PictureBox.Image verwenden:
ausblenden C#-Quelltext
1:
Bitmap bitmap = picturebox.Image as Bitmap;					

Für diesen Beitrag haben gedankt: Lihlu
Lihlu Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 53



BeitragVerfasst: Fr 17.03.17 12:44 
Dieser Link von dir scheint ganz gut zu funktionieren. Nur leider noch mal die frage. Wie bekomme ich das hier auf die PictureBox angewendet ?
gist.github.com/superic/8165723

Tut mir leid für die vielen dumme fragen ._.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Fr 17.03.17 14:07 
Wie setzt du denn das Bild in der PictureBox? Du mußt doch irgendwoher ein Bitmap (bzw. Image) Objekt haben - und darauf wendest du dann die Methode an.
Frühlingsrolle
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 17.03.17 15:04 
- Nachträglich durch die Entwickler-Ecke gelöscht -