Skip to content

Commit

Permalink
dp2Catalog 中 dp2 检索窗控件布局小调整
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalPlatform committed Aug 8, 2023
1 parent f363202 commit 552f803
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 74 deletions.
24 changes: 24 additions & 0 deletions DigitalPlatform.Typography/TypoUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,30 @@ public static void InsertAPicture(
*/
static ImagePartType GetImageType(string content_type)
{
switch (content_type)
{
case "image/pjpeg":
case "image/jpeg":
return ImagePartType.Jpeg;
case "image/gif":
return ImagePartType.Gif;
case "image/bmp":
return ImagePartType.Bmp;
case "image/tiff":
return ImagePartType.Tiff;
case "image/x-icon":
return ImagePartType.Icon;
case "image/x-png":
case "image/png":
return ImagePartType.Png;
case "image/x-emf":
return ImagePartType.Emf;
case "image/x-wmf":
return ImagePartType.Wmf;
case "image/x-pcx":
return ImagePartType.Pcx;
}

var parts = StringUtil.ParseTwoPart(content_type, "/");
string ext = parts[1];
if (Enum.TryParse<ImagePartType>(ext, true, out ImagePartType type) == true)
Expand Down
Loading

0 comments on commit 552f803

Please sign in to comment.