ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 List of file types supported by ImageEn?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

862 Posts

Posted - May 09 2021 :  08:28:50  Show Profile  Reply
I need to build a checklist box with all the file types supported by ImageEn: When checking a file type the Windows shell associates that file type with my application.

Does ImageEn have a built-in function to PROGRAMMATICALLY get a list of all file type extensions supported by ImageEn?

PeterPanino

862 Posts

Posted - May 09 2021 :  09:11:26  Show Profile  Reply
With this code, I get a list of file formats supported by Vcl.Graphics.TGraphic:


  List := TStringList.Create;
  try
    List.Delimiter := ';';
    List.StrictDelimiter := True;
    List.DelimitedText := GraphicFileMask(Vcl.Graphics.TGraphic);
    CodeSite.Send('TformMain.tabsheetShellClick: List', List);
  finally
    List.Free;
  end;


*.svg
*.jpg
*.jpeg
*.gif
*.tif
*.tiff
*.png
*.svg
*.svg
*.svg
*.gif
*.jpg
*.jpeg
*.png
*.bmp
*.ico
*.emf
*.wmf
*.tif
*.tiff

It is strange that some extension (e.g. tif, tiff, svg) are occurring multiple times in this list?
Go to Top of Page

PeterPanino

862 Posts

Posted - May 09 2021 :  09:20:55  Show Profile  Reply
With an optimized code I get a shorter list:


  List := TStringList.Create;
  try
    List.Sorted := True;
    List.Duplicates := dupIgnore;
    List.Delimiter := ';';
    List.StrictDelimiter := True;
    List.DelimitedText := GraphicFileMask(Vcl.Graphics.TGraphic);
    CodeSite.Send('TformMain.tabsheetShellClick: List', List);
  finally
    List.Free;
  end;


*.bmp
*.emf
*.gif
*.ico
*.jpeg
*.jpg
*.png
*.svg
*.tif
*.tiff
*.wmf

How can I programmatically extend this list to all file formats supported by ImageEn?
Go to Top of Page

xequte

38183 Posts

Posted - May 09 2021 :  19:39:02  Show Profile  Reply
Hi

Please see the example at:

https://www.imageen.com/help/TIEImageEnGlobalSettings.FileFormat.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

862 Posts

Posted - May 10 2021 :  04:44:21  Show Profile  Reply
Hi Nigel,

thank you for the hint!

Fortunately, there is also a ReadFunction:

procedure TForm1.btnLoadFormatsClick(Sender: TObject);
// Add all image formats that image can read from
var
  i: Integer;
  fmt: iexBitmaps.TIEFileFormatInfo;
  LoadFormatsList: string;
begin
  for i := 0 to iesettings.IEGlobalSettings().FileFormatCount - 1 do
  begin
    fmt := iesettings.IEGlobalSettings().FileFormat[i];
    if @fmt.ReadFunction <> nil then // Can load?
      LoadFormatsList := LoadFormatsList + fmt.FullName + ' (' + fmt.Extensions + ')' + #13#10;
  end;
  CodeSite.Send('TForm1.btnLoadFormatsClick: LoadFormatsList', LoadFormatsList);
end;


With this function, I could retrieve all formats ImageEn can read from:

TIFF Image (TIFF;TIF;FAX;G3N;G3F;XIF)
GIF Image (GIF)
JPEG Image (JPEG;JPG;JPE;JIF;JFIF)
PaintBrush (PCX)
Windows Bitmap (BMP;DIB;RLE)
Raw Bitmap ()
Windows Icon (ICO)
Windows Cursor (CUR)
Portable Network Graphics (PNG)
DICOM Medical Image (DICOM;DCM;DIC;V2)
Windows Metafile (WMF)
Enhanced Metafile (EMF)
Targa Image (TARGA;TGA;VDA;ICB;VST;PIX)
Portable Pixmap (PXM;PPM;PGM;PBM)
Wireless Bitmap (WBMP)
JPEG2000 (JP2)
JPEG2000 Code Stream (J2K;JPC;J2C)
Adobe PDF (PDF)
Multipage PCX (DCX)
Camera Raw Image (CRW;CR2;CR3;DNG;NEF;RAW;RAF;X3F;ORF;SRF;MRW;DCR;BAY;PEF;SR2;ARW;KDC;MEF;3FR;K25;ERF;CAM;CS1;DC2;DCS;FFF;MDC;MOS;NRW;PTX;PXN;RDC;RW2;RWL;IIQ;SRW)
Photoshop PSD (PSD;PSB)
Vector Objects File (IEV)
Vector Advanced File (ALL)
ImageEn Layers (IEN;IMAGEEN;LYR)
Microsoft HD Photo (WDP;HDP;JXR)
DirectDraw Surface (DDS)
High Efficiency Image File (HEIC;HEIF;HEICS;AVCS;HEIFS)
WebP (WEBP)
Other Windows Images ()


However, there are 2 entries that are unclear:

"Raw Bitmap ()"
"Other Windows Images ()"

These have no fmt.Extensions.
Go to Top of Page

xequte

38183 Posts

Posted - May 11 2021 :  04:59:15  Show Profile  Reply
Hi

"Raw Bitmap" is just raw bitmap data. It does not have a file extension. "Other Windows Images" are formats that are supported via WIC but of an unknown extension.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: