예제 #1
0
파일: Image.cs 프로젝트: npuBug/epublibrary
 public static string GetExtensionByMediaType(EPUBImageTypeEnum imageType)
 {
     switch (imageType)
     {
         case EPUBImageTypeEnum.ImageGIF:
             return "gif";
         case EPUBImageTypeEnum.ImageJPG:
             return "jpeg";
         case EPUBImageTypeEnum.ImagePNG:
             return "png";
         case EPUBImageTypeEnum.ImageSVG:
             return "svg";
     }
     throw new Exception("unknown image type passed");
 }
예제 #2
0
파일: Image.cs 프로젝트: npuBug/epublibrary
 public static EPubCoreMediaType ConvertImageTypeToMediaType(EPUBImageTypeEnum imageType)
 {
     switch (imageType)
     {
         case EPUBImageTypeEnum.ImageGIF:
             return EPubCoreMediaType.ImageGif;
         case EPUBImageTypeEnum.ImageJPG:
             return EPubCoreMediaType.ImageJpeg;
         case EPUBImageTypeEnum.ImagePNG:
             return EPubCoreMediaType.ImagePng;
         case EPUBImageTypeEnum.ImageSVG:
             return EPubCoreMediaType.ImageSvgXml;
     }
     throw new Exception("unknown image type passed");
 }
예제 #3
0
        public static string GetExtensionByMediaType(EPUBImageTypeEnum imageType)
        {
            switch (imageType)
            {
            case EPUBImageTypeEnum.ImageGIF:
                return("gif");

            case EPUBImageTypeEnum.ImageJPG:
                return("jpeg");

            case EPUBImageTypeEnum.ImagePNG:
                return("png");

            case EPUBImageTypeEnum.ImageSVG:
                return("svg");
            }
            throw new Exception("unknown image type passed");
        }
예제 #4
0
        public static EPubCoreMediaType ConvertImageTypeToMediaType(EPUBImageTypeEnum imageType)
        {
            switch (imageType)
            {
            case EPUBImageTypeEnum.ImageGIF:
                return(EPubCoreMediaType.ImageGif);

            case EPUBImageTypeEnum.ImageJPG:
                return(EPubCoreMediaType.ImageJpeg);

            case EPUBImageTypeEnum.ImagePNG:
                return(EPubCoreMediaType.ImagePng);

            case EPUBImageTypeEnum.ImageSVG:
                return(EPubCoreMediaType.ImageSvgXml);
            }
            throw new Exception("unknown image type passed");
        }
예제 #5
0
 public ImageOnStorage(string id, EPUBImageTypeEnum type)
 {
     _id        = id;
     _imageType = type;
 }
예제 #6
0
 public ImageOnStorage(EPUBImage eImage)
 {
     _id        = eImage.ID;
     _imageType = eImage.ImageType;
 }
예제 #7
0
 public ImageOnStorage(string id, EPUBImageTypeEnum type)
 {
     _id = id;
     _imageType = type;
 }
예제 #8
0
 public ImageOnStorage(EPUBImage eImage)
 {
     _id = eImage.ID;
     _imageType = eImage.ImageType;
 }