示例#1
0
 public void png_convert_from_DateTime(ref png_time ptime, DateTime ttime)
 {
     ptime.year   = (ushort)ttime.Year;
     ptime.month  = (byte)(ttime.Month + 1);
     ptime.day    = (byte)ttime.Day;
     ptime.hour   = (byte)ttime.Hour;
     ptime.minute = (byte)ttime.Minute;
     ptime.second = (byte)ttime.Second;
 }
示例#2
0
 public PNG_INFO png_get_tIME(ref png_time mod_time)
 {
     if ((info_ptr_valid & PNG_INFO.tIME) != PNG_INFO.tIME)
     {
         return(PNG_INFO.None);
     }
     mod_time = info_ptr_mod_time;
     return(PNG_INFO.tIME);
 }
示例#3
0
		public PNG_INFO png_get_tIME(ref png_time mod_time)
		{
			if((info_ptr_valid&PNG_INFO.tIME)!=PNG_INFO.tIME) return PNG_INFO.None;
			mod_time=info_ptr_mod_time;
			return PNG_INFO.tIME;
		}
示例#4
0
 public void png_set_tIME(png_time mod_time)
 {
     info_ptr_mod_time = mod_time;
     info_ptr_valid   |= PNG_INFO.tIME;
 }
示例#5
0
		public void png_set_tIME(png_time mod_time)
		{
			info_ptr_mod_time=mod_time;
			info_ptr_valid|=PNG_INFO.tIME;
		}
示例#6
0
		// Write the tIME chunk. Use either png_convert_from_struct_tm()
		// or png_convert_from_time_t(), or fill in the structure yourself.
		void png_write_tIME(png_time mod_time)
		{
			byte[] buf=new byte[7];

			if(mod_time.month>12||mod_time.month<1||mod_time.day>31||mod_time.day<1||mod_time.hour>23||mod_time.second>60)
			{
				Debug.WriteLine("Invalid time specified for tIME chunk");
				return;
			}

			png_save_uint_16(buf, mod_time.year);
			buf[2]=mod_time.month;
			buf[3]=mod_time.day;
			buf[4]=mod_time.hour;
			buf[5]=mod_time.minute;
			buf[6]=mod_time.second;

			png_write_chunk(PNG.tIME, buf, 7);
		}
示例#7
0
		public void png_convert_from_DateTime(ref png_time ptime, DateTime ttime)
		{
			ptime.year=(ushort)ttime.Year;
			ptime.month=(byte)(ttime.Month+1);
			ptime.day=(byte)ttime.Day;
			ptime.hour=(byte)ttime.Hour;
			ptime.minute=(byte)ttime.Minute;
			ptime.second=(byte)ttime.Second;
		}