Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Falls GDI+ zur Verfügung steht, geht das relativ einfach.

Hier eine Beispiel-Konsolenanwendung:

// GDI+
#include <windows.h>
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment( lib, "gdiplus.lib" )

// für cout
#include <iostream>
using namespace std;

int main()
{
// GDI+ initialisieren
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

// Scopeklammern, damit alle Objekte vor GdiPlusShutdown zerstört sind
{
Bitmap bm1( L"C:\\kk.gif" );
Bitmap bm2( L"C:\\kk2.gif" );

if( bm1.GetWidth() != bm2.GetWidth() || bm1.GetHeight() != bm2.GetHeight() ) {
// Unterschiedliche Abmessungen
cout << "Die Bilder haben unterschiedliche Abmessungen." << endl;
cout << "Es wurde kein Vergleich durchgeführt." << endl;
}
else {
int nDifferentPixels = 0;
Color color1, color2;
for( int x=0; x<bm1.GetWidth(); ++x ) {
for( int y=0; y<bm1.GetHeight(); ++y ) {
if( Ok == bm1.GetPixel( x,y, &color1 ) && Ok == bm2.GetPixel( x,y, &color2 ) ) {
if( color1.GetValue() != color2.GetValue() ) {
++nDifferentPixels;
}
}
}
}
cout << "Unterschiedliche Pixel: " << nDifferentPixels << endl;
}
}

GdiplusShutdown(gdiplusToken);
return 0;
}
[/CODE]

Grüß Euch!

Falls die Postings vorher Deine Frage nicht beantwortet haben, adnn schreib doch einfach mal, was Du da vergleichen willst und vieleicht noch warum.

@Mod

Sorry, ich will Dir hier nicht in die Parade fahren, aber vieleicht hat er oder sie ja was anderes gesucht.

:P GREETZ :P

********

* Fiesek *

********

Und was war nun das genaue Problem und die richtige Lösung dazu?

:P GREETZ :P

********

* Fiesek *

********

Originally posted by Fiesek

Und was war nun das genaue Problem und die richtige Lösung dazu?

Das genaue Problem war, die Anzahl der unterschiedlichen Pixel in zwei Bilddateien zu ermitteln. Das sollte mit unterschiedlichen Bitmap-Dateiformaten funktionieren. "Die" richtige Lösung dafür gibt es nicht. Was ich oben beschrieben habe, funktioniert und ist im Vergleich zu anderen möglichen Lösungen recht komfortabel, benötigt allerdings GDI+.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.