Re: No way to save files of type ".jpg" (Patch included)



Sorry,

i forgot to append the patch in the right format.


so long
jens


* Thus spake Jens Grunert (jens grunert gmx de):
> 
> Hi people,
> 
> i'm new to this list, so excuse me if this topic was handled before.
> 
> Sometimes i had problems to upload picture to picasaweb. The following exception was thrown:
> 
> System.NotImplementedException: No way to save files of type ".jpg"
>   at FSpot.Filters.ResizeFilter.Convert (System.String source, System.String dest) [0x00000] 
>   at FSpot.Filters.FilterSet.Convert (System.String source, System.String dest) [0x00000] 
>   at FSpot.GoogleExport.Upload () [0x00000] 
> 
> 
> So what's the problem? The problem are files with the extension .JPG (btw.: .jpg works).
> I think the problem is the Method:
> 
> public static string TempPath (string name, string extension){}
> 
> The Method handles only .jpg files! Btw: Why is the extension hardcoded?
> When you use the Method System.IO.Path.GetExtension() to get the extension everything works fine.
> 
> So this Patch does the trick for me:
> 
> ---- snip ----
> 193c193,195
> <
> ---
> >
> >               // FIXME the input extension is not used.
> >               // // Get the real extension (case sensitive!)
> 195a198
> >                       string realextension = System.IO.Path.GetExtension (name);
> 197c200,201
> <                       string imgtemp = temp + "." + extension;
> ---
> >                       //string imgtemp = temp + "." + extension;
> >                       string imgtemp = temp + "." + realextension;
> ---- snip ----
> 
> 
> So long,
> Jens
> 
--- ImageFile.cs_cvs20061024	2006-10-24 19:11:28.000000000 +0200
+++ ImageFile.cs	2006-10-24 19:12:10.000000000 +0200
@@ -190,11 +190,15 @@
 		{
 			return TempPath (name, System.IO.Path.GetExtension (name));
 		}
-		
+	
+		// FIXME the input extension is not used.
+		// // Get the real extension (case sensitive!)
 		public static string TempPath (string name, string extension)
 		{
+			string realextension = System.IO.Path.GetExtension (name);
 			string temp = System.IO.Path.GetTempFileName ();
-			string imgtemp = temp + "." + extension;
+			//string imgtemp = temp + "." + extension;
+			string imgtemp = temp + "." + realextension;
 
 			System.IO.File.Move (temp, imgtemp);
 

Attachment: pgpeVT6n0zugy.pgp
Description: PGP signature



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