Solved

JPGE Images

Posted on 2004-04-19
6
198 Views
Last Modified: 2010-04-05
Hi Experts,

Could anybody tell me how to check if two Images are identically or not? (JPGE )

k4hvd
0
Comment
Question by:k4hvd77
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:Ivanov_G
Comment Utility

   uses
      jpeg;

   var
     jpg_file : TJpegImage;

   load the JPG image in this JpegImage and the convert to Bitmap using Bitmap.Assign(JPG_file) method. Now you have 2 Bitmaps which have Canvas propery and you can compare them.

    The other way is to compare the size, the headers, etc. but this don't guarantee you anything.
0
 
LVL 4

Expert Comment

by:mbprogrammer
Comment Utility
There are many algorithms for this purpos. it depends on your destination
(I mean your app usage) some of them compares RGB colors. it's a fast and trustable method. they compared the amount of each color not the pixeles and not the position of them. they also after getting the ture result from this test , they will test a little amount of pixels and their positions.
0
 
LVL 4

Author Comment

by:k4hvd77
Comment Utility
mbprogrammer,
I need a fast method! Could you post some codes how to do theat?


k4hvd77
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 4

Accepted Solution

by:
mbprogrammer earned 250 total points
Comment Utility
this is a very simple and easy way to check the equality of two icons. you can change it for bmps.

function IconsAreEqual(const Icon1, Icon2: TIcon): Boolean;
var
  ms1: TMemoryStream;
  ms2: TMemoryStream;
begin
  Result := False;
  ms1    := TMemoryStream.Create;
  try
    Icon1.SaveToStream(ms1);
    ms2 := TMemoryStream.Create;
    try
      Icon2.SaveToStream(ms2);
      if ms1.Size = ms2.Size then
        // Compare the streams, Streams vergleichen:
        Result := CompareMem(ms1.Memory, ms2.Memory, ms1.Size)
      finally
        ms2.Free
    end
  finally
    ms1.Free
  end
end;

for better algorithms codes, you should search , I cann't help you now, I have many works to do (sorry) ;)
0
 
LVL 4

Expert Comment

by:mbprogrammer
Comment Utility
have a look at here is good : http://www.catenary.com/howto/comparator.html
0
 
LVL 4

Author Comment

by:k4hvd77
Comment Utility
thank you mbprogrammer ;)


k4hvd77
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now