using System;
using ;
namespace PubLib
{
/// <summary>
/// Summary description of PicShow.
/// </summary>
public class PicShow
{
public PicShow()
{
//
// TODO: Add constructor logic here
//
}
//Find whether the image file exists
public static string ViewPIC(string PicPath, string PicName)
{
string BigPic = Checks.HM_PHYSICSROOT + "MoviePIC/"+Checks.HM_PICROOTPATH+"/"+PicName;
string SmlPic = Checks.HM_PHYSICSROOT + "MoviePIC/"+PicPath+"/"+PicName;
if (null==PicName || false==(BigPic)) //The large image name is empty or the file does not exist
PicName = "";
string OutPic = "MoviePIC/"+PicPath+"/"+PicName;
if (!(SmlPic)) //Looking for small pictures does not exist
{
CreatePIC(PicPath, PicName);
return OutPic;
}
return OutPic;
}
//Create thumbnails
public static void CreatePIC(string PicPath, string PicName)
{
int iWidth,iHeight;
if (null!=PicPath && ("X")>1)
{
char[] spliter = {X};
string[] aPicPath = (spliter,2);
iWidth = (aPicPath[0]);
iHeight = (aPicPath[1]);
string BigPic = Checks.HM_PHYSICSROOT + "MoviePIC/"+Checks.HM_PICROOTPATH+"/"+PicName;
string SmlPic = Checks.HM_PHYSICSROOT + "MoviePIC/"+PicPath+"/"+PicName;
Image BigImage = (BigPic);
Image SmlImage = (iWidth,iHeight,null,new ());
(SmlPic,);
();
();
}
}
}
}