TdxSmartImage is very useful to allow an easier use of TcxImage controls, but it should also handle JPEG images.
Since JPEG is the most used format for pictures and PNG becoming the prefered for Internet related images, it makes sense that TdxSmartImage can handle both formats.
The point here is to avoid having to write code to handle the correct graphics class and to avoid having a database field to store the image format.
Thanks.
Luis
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Luis,
Thank you for your message. I am afraid your suggestion is not quite clear to me. Attached is an example, which contains our TcxImage and properly loads a .jpg file into it. Please modify this sample to illustrate the problem and attach it to your next message. We will examine it and do our best to find a solution or implement your suggestion. I am looking forward to hearing from you.
Best Regards,
Paulo
Hi,
It seems I explained the problem incorrectly.
When we use the TcxImage popupmenu to Load a picture it only loads TIF, GIF and PNG.
With this I thought it would only handle these formats, but I see now that it is only the open dialog that need to be configured.
Thanks,
Luis
Ok, I found the problem.
Its in dxGDIPlusClasses.pas unit at line 1854.
TPicture.RegisterFileFormat('TIF;*.GIF;*.PNG', 'All graphics', TdxSmartImage);
This only register 3 files formats with the TdxSmartImage class.
And the JPG file format is left out.
It can be easily fixed in my own code:
initialization
TPicture.UnRegisterGraphicClass(TdxPNGImage);
TPicture.UnRegisterGraphicClass(TdxSmartImage);
TPicture.RegisterFileFormat('PNG', 'Imagens PNG', TdxPNGImage);
TPicture.RegisterFileFormat('JPG;*.JPEG;*.TIF;*.GIF;*.PNG', 'Todas as imagens', TdxSmartImage);