예제 #1
0
		public override void  defineBitsLossless2(DefineBitsLossless tag)
		{
			int id = dict.add(tag);
			tagw.writeUI16(id);
			tagw.writeUI8(tag.format);
			tagw.writeUI16(tag.width);
			tagw.writeUI16(tag.height);
			switch (tag.format)
			{
				
				case 3: 
					tagw.writeUI8(tag.colorData.Length - 1);
					tagw.markComp();
					encodeAlphaColorMapData(tag.colorData, tag.data, tagw);
					break;
				
				case 4: 
				case 5: 
					tagw.markComp();
					encodeBitmapData(tag.data, tagw);
					break;
				}
			encodeTag(tag);
		}
예제 #2
0
		public override void  defineBitsLossless(DefineBitsLossless tag)
		{
			open(tag);
			out_Renamed.Write(" id='" + id(tag) + "' width='" + tag.width + "' height='" + tag.height + "'");
			
			if (external)
			{
				System.String path = externalDirectory + externalPrefix + "image" + dict.getId(tag) + ".bitmap";
				
				//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
				out_Renamed.WriteLine(" src='" + path + "' />");
				try
				{
					//UPGRADE_TODO: Constructor 'java.io.FileOutputStream.FileOutputStream' was converted to 'System.IO.FileStream.FileStream' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioFileOutputStreamFileOutputStream_javalangString_boolean'"
					System.IO.FileStream image = SupportClass.GetFileStream(path, false);
					SupportClass.WriteOutput(image, tag.data);
					image.Close();
				}
				catch (System.IO.IOException e)
				{
					//UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'"
					out_Renamed.WriteLine("<!-- error: unable to write external asset file " + path + "-->");
				}
			}
			else
			{
				out_Renamed.Write(" encoding='base64'");
				end();
				outputBase64(tag.data);
				close(tag);
			}
		}
예제 #3
0
 public override void  defineBitsLossless2(DefineBitsLossless tag)
 {
     tags.Add(tag);
 }
예제 #4
0
 public virtual void  defineBitsLossless2(DefineBitsLossless tag)
 {
 }