Using Pdg2.DLL to decode the state of PDG

Source: Internet
Author: User
Tags forum software

Ma Jian
Email:[email protected]
Published: 2008.08.03

First, entry-level
Principle: Call the Pdg2.DLL interface according to the method described in "Converting from BCB to BMP format".
Advantages: Simple and clear, basically to move the example to come.
Cons: 1, occupy the system Clipboard, sometimes very upset. 2, T3 type PDG may lose the illustration layer, or the illustration layer color is incorrect.
Application: Coolman early software, and some other people of the Forum software, have used this method.

Second, the Clipboard hook level
Principle: On the basis of "entry level", through API HOOK, avoid the "actual" occupation of the system Clipboard. This "actual" two words, has already put the method completely to speak out.
Pros: No longer occupies the system Clipboard, performance has improved.
Disadvantage: T3 type PDG problem is still.
Application: Coolman mid-term software used this method, others seem to have used it. Cheming's TC reading plugin even uses 3 controls to decode the background at the same time to speed up.

Third, Com-level
Description: This is the first public release of this method, and I've only told SMARTSL once.
Principle: Pdg2.DLL implementation is actually a COM component, according to the Microsoft COM specification, COM components must implement some interfaces. If developers use out-of-the-box frameworks when developing COM components, some interfaces might bring their own-which is probably not even realized by CX's COM component developers, and people who know can get the decoded image (DDB) directly through the interface.
Advantages: There is no need to deal with the Clipboard, or API HOOK, directly call the standard COM interface can be, simple to no suspense, of course, if you want to know which interface to call.
Disadvantage: The T3 class image can only get the text layer, the illustration layer needs to deal with itself.
Application: Pdg2pic V1.00. When I was using Coolman's pdg2bmp&jpg&tif&pdf&txt, I was so upset that it took up the system clipboard that I thought about developing pdg2pic, so I got around the clipboard at first.

Third, API hook level
Description: This is the first public release of this method, previously I only told someone once, and gave him the source code, of course, this is a certain premise of the exchange.
Principle: Through the API HOOK, directly get the Pdg2.DLL decoded Dib.
Pros: All of the above methods get the DDB, only this can get DIB, the speed has been greatly improved, the system resource consumption has also decreased.
Disadvantage: The T3 class image can only get the text layer, the illustration layer needs to deal with itself.
Application: Pdg2pic V1.01 as a backup method.

Common features of all methods based on Pdg2.DLL:
1, fault tolerance is too poor, as long as the original PDG file a bit of a problem, CPU occupied 100%, non-normal exit that is commonplace.
2, even if the file is normal, as long as the page, memory consumption will increase, especially the DjVu format of PDG. CX Programmer Call Djvulibre method is extremely naïve, for any qualified VC programmer is a joke, but CX incredibly used a djvulibre dare to claim to master the "wavelet image compression", really defy.
3, from the interface, with Pdg2.DLL decoding should be able to solve the known account information (such as my account number) 6xH, but the blessing of the Master of the road, although I am a CX VIP, but 6xH for me has been an absence, so there is no interest in-depth study.

Thus, from V1.01 onwards, Pdg2pic no longer uses Pdg2.DLL, the results of which belong to the public, and no individual has the right to be open.

Using Pdg2.DLL to decode the state of PDG

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.