Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 247841 Details for
Bug 366521
[patch] Resize/Export problem in 0.3.5, fixed in 0.4.0
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
f-spot-resizefilter.patch
f-spot-resizefilter.patch (text/plain), 3.21 KB, created by
Tim Waugh
on 2007-11-05 09:40:41 UTC
(
hide
)
Description:
f-spot-resizefilter.patch
Filename:
MIME Type:
Creator:
Tim Waugh
Created:
2007-11-05 09:40:41 UTC
Size:
3.21 KB
patch
obsolete
>--- f-spot-0.3.5/src/Filters/ResizeFilter.cs 2007-01-09 02:07:23.000000000 +0000 >+++ ../F-8/f-spot-0.4.0/src/Filters/ResizeFilter.cs 2007-08-01 20:09:06.000000000 +0100 >@@ -43,29 +43,32 @@ > System.Uri dest_uri = req.TempUri (System.IO.Path.GetExtension (source)); > string dest = dest_uri.LocalPath; > >- ImageFile img = ImageFile.Create (source); >- using (Pixbuf pixbuf = img.Load ((int)size, (int)size)) { >- >- if (pixbuf.Width < size && pixbuf.Height < size) >- return false; >- >- string destination_extension = Path.GetExtension (dest); >- >- if (Path.GetExtension (source).ToLower () == Path.GetExtension (dest).ToLower ()) { >- using (Stream output = File.OpenWrite (dest)) { >- img.Save (pixbuf, output); >- } >- } else if (destination_extension == ".jpg") { >- // FIXME this is a bit of a nasty hack to work around >- // the lack of being able to change the path in this filter >- // and the lack of proper metadata copying yuck >- Exif.ExifData exif_data; >+ using (ImageFile img = ImageFile.Create (source)) { > >- exif_data = new Exif.ExifData (source); >- >- PixbufUtils.SaveJpeg (pixbuf, dest, 95, exif_data); >- } else >- throw new NotImplementedException (String.Format (Catalog.GetString ("No way to save files of type \"{0}\""), destination_extension)); >+ using (Pixbuf pixbuf = img.Load ()) { >+ if (pixbuf.Width < size && pixbuf.Height < size) >+ return false; >+ } >+ >+ using (Pixbuf pixbuf = img.Load ((int)size, (int)size)) { >+ string destination_extension = Path.GetExtension (dest); >+ >+ if (Path.GetExtension (source).ToLower () == Path.GetExtension (dest).ToLower ()) { >+ using (Stream output = File.OpenWrite (dest)) { >+ img.Save (pixbuf, output); >+ } >+ } else if (destination_extension == ".jpg") { >+ // FIXME this is a bit of a nasty hack to work around >+ // the lack of being able to change the path in this filter >+ // and the lack of proper metadata copying yuck >+ Exif.ExifData exif_data; >+ >+ exif_data = new Exif.ExifData (source); >+ >+ PixbufUtils.SaveJpeg (pixbuf, dest, 95, exif_data); >+ } else >+ throw new NotImplementedException (String.Format (Catalog.GetString ("No way to save files of type \"{0}\""), destination_extension)); >+ } > } > > req.Current = dest_uri; >--- f-spot-0.3.5/src/Imaging/ImageFile.cs 2007-01-09 02:07:22.000000000 +0000 >+++ ../F-8/f-spot-0.4.0/src/Imaging/ImageFile.cs 2007-08-01 20:09:06.000000000 +0100 >@@ -8,7 +8,7 @@ > } > } > >- public class ImageFile { >+ public class ImageFile : IDisposable { > protected Uri uri; > > static System.Collections.Hashtable name_table; >@@ -53,6 +53,7 @@ > name_table [".nef"] = typeof (FSpot.Tiff.NefFile); > name_table [".pef"] = typeof (FSpot.Tiff.NefFile); > name_table [".raw"] = typeof (FSpot.Tiff.NefFile); >+ name_table [".kdc"] = typeof (FSpot.Tiff.NefFile); > name_table [".tiff"] = typeof (FSpot.Tiff.TiffFile); > name_table [".tif"] = typeof (FSpot.Tiff.TiffFile); > name_table [".orf"] = typeof (FSpot.Tiff.NefFile); >@@ -200,5 +201,15 @@ > > return imgtemp; > } >+ >+ public void Dispose () >+ { >+ Close (); >+ GC.SuppressFinalize (this); >+ } >+ >+ protected virtual void Close () >+ { >+ } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 366521
: 247841