[f-spot] Removed TIFF write support from Imaging.



commit e5bbd9c375da11f8edb77004f6635e8eb170d487
Author: Ruben Vermeersch <ruben savanne be>
Date:   Wed Jun 30 10:06:30 2010 +0200

    Removed TIFF write support from Imaging.

 src/Imaging/Bim.cs  |   34 ------------------
 src/Imaging/Tiff.cs |   94 ---------------------------------------------------
 2 files changed, 0 insertions(+), 128 deletions(-)
---
diff --git a/src/Imaging/Bim.cs b/src/Imaging/Bim.cs
index c99d38e..59a496e 100644
--- a/src/Imaging/Bim.cs
+++ b/src/Imaging/Bim.cs
@@ -114,33 +114,6 @@ namespace FSpot.Imaging.Bim {
 
 			return header.Length + Data.Length;
 		}
-		
-		public void Save (System.IO.Stream stream) 
-		{
-			byte [] tmp;
-			tmp = System.Text.Encoding.ASCII.GetBytes (Marker);
-			stream.Write (tmp, 0, tmp.Length);
-			tmp = FSpot.BitConverter.GetBytes (Type, false);
-			stream.Write (tmp, 0, tmp.Length);
-
-			// Write the name
-			stream.WriteByte ((byte)Name.Length);
-			tmp = System.Text.Encoding.ASCII.GetBytes (Name);
-			stream.Write (tmp, 0, tmp.Length);
-
-			// Pad the name
-			if (tmp.Length % 2 == 0)
-				stream.WriteByte (0);
-
-			// Write the data
-			tmp  = FSpot.BitConverter.GetBytes ((uint)Data.Length, false);
-			stream.Write (tmp, 0, tmp.Length);
-
-			stream.Write (Data, 0, Data.Length);
-			// Pad the data
-			if (Data.Length % 2 > 0)
-				stream.WriteByte (0);
-		}
 	}
 
 	public class BimFile : SemWeb.StatementSource
@@ -203,13 +176,6 @@ namespace FSpot.Imaging.Bim {
 				entries.Add (current);
 			}
 		}
-
-		public void Save (System.IO.Stream stream)
-		{
-			foreach (Entry e in entries) {
-				e.Save (stream);
-			}
-		}
 	}
 }
 
diff --git a/src/Imaging/Tiff.cs b/src/Imaging/Tiff.cs
index 5a91b49..fcebca1 100644
--- a/src/Imaging/Tiff.cs
+++ b/src/Imaging/Tiff.cs
@@ -1076,34 +1076,6 @@ namespace FSpot.Imaging.Tiff {
 				}
 			}
 		}
-
-		public void Save (System.IO.Stream out_stream)
-		{
-			OrderedWriter writer = new OrderedWriter (out_stream, endian == Endian.Little);
-			
-			/* Header */
-			if (endian == Endian.Little) {
-				writer.Write ((byte)'I');
-				writer.Write ((byte)'I');
-			} else {
-				writer.Write ((byte)'M');
-				writer.Write ((byte)'M');
-			}
-			
-			writer.Write ((ushort)42);
-			
-			/* First IFD */
-			Directory.Save (writer, 8);
-		}
-
-		public void Dump (string name)
-		{
-			ImageDirectory ifd = Directory;
-			for (int i = 0; ifd != null; i++) {
-				ifd.Dump (System.String.Format ("IFD[{0}]:", i));
-				ifd = ifd.NextDirectory;
-			}
-		}
 	}
 
 	public class ImageDirectory {
@@ -1125,30 +1097,6 @@ namespace FSpot.Imaging.Tiff {
 			Load (stream);
 		}
 		
-		public uint Save (OrderedWriter writer, uint position)
-		{
-			writer.Write (position);
-			writer.Stream.Position = position;
-
-			writer.Write ((ushort)entries.Count);
-
-			position += 2;
-			uint  value_position = (uint) (position + 12 * entries.Count + 4);
-
-			for (int i = 0; i < entries.Count; i++) {
-				writer.Stream.Position = position + (12 * i);
-				value_position = (uint)Entries[i].Save (writer, value_position);
-			}
-							
-			writer.Stream.Position = position + (12 * entries.Count);
-			if (next_directory != null)
-				value_position = next_directory.Save (writer, value_position);
-			else 
-				writer.Write ((uint) 0);
-
-			return value_position;
-		}
-
 		protected void Load (System.IO.Stream stream)
 		{
 			ReadHeader (stream);			
@@ -1426,30 +1374,6 @@ namespace FSpot.Imaging.Tiff {
 			}
 		}
 
-		public override uint Save (OrderedWriter writer, uint position)
-		{
-			writer.Write ((ushort)Id);
-			writer.Write ((ushort)Type);
-			writer.Write ((uint)Count);
-
-
-			if (Directory.Length == 1) {
-				writer.Write ((uint)position);
-				position = Directory [0].Save (writer, position);
-			} else if (Directory.Length > 1) {
-				writer.Write ((uint)position);
-				uint value_position = (uint) (position + Directory.Length * 4);
-				for (int i = 0; i < Directory.Length; i++) {
-					writer.Stream.Position = position + i * 4;
-					value_position = Directory [i].Save (writer, value_position);
-				}
-				return value_position;
-			} else
-				writer.Write ((uint) 0);
-
-			return position;
-		}
-
 		public virtual uint GetEntryCount ()
 		{
 			return count;
@@ -1587,24 +1511,6 @@ namespace FSpot.Imaging.Tiff {
 			}
 		}
 
-		public virtual uint Save (OrderedWriter writer, uint position)
-		{
-			writer.Write ((ushort)Id);
-			writer.Write ((ushort)Type);
-			writer.Write ((uint)Count);
-			if (Length > 4) {
-				writer.Write ((uint)position);
-				writer.Stream.Position = position;
-				writer.Stream.Write (RawData, 0, RawData.Length);
-				return (uint) (position + RawData.Length);
-			} else {
-				writer.Stream.Write (RawData, 0, RawData.Length);
-				for (int i = 0; i < 4 - RawData.Length; i++)
-					writer.Write ((byte)0);
-			}
-			return position;
-		}
-
 		public void SetOrigin (uint pos)
 		{
 			offset_origin = pos;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]