Permalink
Browse files

Image loading (NS): respect DPI. Provide high-resolution version of l…

…ogo.

aquamacs-fancy-splash-screen.jpg now named aquamacs-logo.tiff

Conflicts:

	src/nsimage.m
  • Loading branch information...
davidswelt committed Jul 3, 2012
1 parent db6ed87 commit 8331e6795444bee1f741a706f370a15b70d2709e
View
@@ -456,7 +456,7 @@ install-aquamacs: mkdir
(cd $(ns_appresdir)/etc/images && find . -name '*.svg' -delete ; cd -) ; \
(cp $(AQUAMACS_DIR)/src/site-lisp/tabbar/*.png $(ns_appresdir)/etc/images/ && \
rm $(ns_appresdir)/lisp/aquamacs/tabbar/*.png) ; \
- cp $(AQUAMACS_DIR)/src/etc/aquamacs-splash-screen.jpg $(ns_appresdir)/etc/images/ ; \
+ cp $(AQUAMACS_DIR)/src/etc/aquamacs-logo.tiff $(ns_appresdir)/etc/images/ ; \
rm -r "$(ns_appresdir)/Aquamacs Help" 2>/dev/null ; \
cp -r $(AQUAMACS_DIR)"/doc/Aquamacs Help" "$(ns_appresdir)/Aquamacs Help" ; \
(cd $(ns_appresdir)/leim ; rm quail/*.el quail/*.el.gz ja-dic/*.el ja-dic/*.el.gz ; cd -) ; \

Large diffs are not rendered by default.

Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Deleted file not rendered
@@ -1345,7 +1345,7 @@ to the selected frame."
(require 'savehist) ;; because we configure and activate it
(aquamacs-set-defaults
- '((fancy-splash-image "aquamacs-splash-screen.jpg")
+ '((fancy-splash-image "aquamacs-logo.tiff")
(fancy-splash-max-time 3000)))
;; while pc selection mode will be turned on, we don't
View
@@ -204,17 +204,30 @@ @implementation EmacsImage
image = [[EmacsImage alloc] initByReferencingFile:
[NSString stringWithUTF8String: SDATA (found)]];
+ // image = [NSImage imageNamed: [NSString stringWithUTF8String: SDATA (found)]];
+
+
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
+#else
imgRep = [image bestRepresentationForDevice: nil];
+#endif
if (imgRep == nil)
{
[image release];
return nil;
}
+ /* Do not ignore the DPI of the image - in case of multiple representations
+ (e.g., TIFFs with images for multiple resolutions), retain image size and
+ let NSImage choose the right representation. */
+
/* The next two lines cause the DPI of the image to be ignored.
This seems to be the behavior users expect. */
- [image setScalesWhenResized: YES];
- [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
+ // [image setScalesWhenResized: YES];
+ // [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
+ // this would retain the size:
+ // [image setSize: NSMakeSize([image size].width, [image size].height)];
[image setName: [NSString stringWithUTF8String: SDATA (file)]];
[image reference];

0 comments on commit 8331e67

Please sign in to comment.