[prev in list] [next in list] [prev in thread] [next in thread]
List: gallery-checkins
Subject: [Gallery-checkins] CVS: gallery2/include/classes/GalleryGraphics NetPbmGraphics.class,1.4,1.5
From: Bharat Mediratta <bharat () users ! sourceforge ! net>
Date: 2002-08-24 22:31:14
[Download RAW message or body]
Update of /cvsroot/gallery/gallery2/include/classes/GalleryGraphics
In directory usw-pr-cvs1:/tmp/cvs-serv26770/include/classes/GalleryGraphics
Modified Files:
NetPbmGraphics.class
Log Message:
Another giant round of checkins. Here's what's arrived in this batch
of changes:
* moved more smarts into GalleryDerivativeImage; now it knows how to
update its meta data when the cache is rebuilt
* Tweaked the GalleryGraphics API so that it can now understand cache
files (which have no file extension)
* All Gallery HTTP GET/POST variables are now implicitly prefixed
which effectively gives us our own namespace. This will avoid
conflicts when we're eventually embedded into another application
* Cloned GalleryItem.getChildren() into getChildrenWithTypes() so that
we can get the children either way.
* Layouts and styles have arrived! I've implemented the View side
of the MVC model. The ShowItem has the ability to delegate control
to a layout engine, and it can figure out which theme applies to
the given item and apply that also. So now every item has the ability
to have its own layout and style.
* Created the "classic" layout and style -- these will look exactly like
Gallery 1.x when we're done. We still have to move some of the
layout code into a common superclass.
Index: NetPbmGraphics.class
===================================================================
RCS file: /cvsroot/gallery/gallery2/include/classes/GalleryGraphics/NetPbmGraphics.class,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NetPbmGraphics.class 15 Aug 2002 06:24:15 -0000 1.4
+++ NetPbmGraphics.class 24 Aug 2002 22:31:11 -0000 1.5
@@ -74,12 +74,13 @@
*
* @access public
* @param string a file name
+ * @param string an optional file extension hint
* @return array object GalleryStatus a status code,
* int the image width, int the image height
*/
- function getImageDimensions($filename) {
+ function getImageDimensions($filename, $fileExtension=false) {
- list($ret, $convertToPnmCmd) = $this->_convertToPnmCmd($filename);
+ list($ret, $convertToPnmCmd) = $this->_convertToPnmCmd($filename, $fileExtension);
if ($ret->isError()) {
return array($ret, null, null);
}
@@ -319,9 +320,12 @@
* @return array object GalleryStatus a status code,
* array 1 or more string commands
*/
- function _convertToPnmCmd($filename) {
+ function _convertToPnmCmd($filename, $fileExtension=false) {
- $fileExtension = GalleryUtilities::getFileExtension($filename);
+ if (empty($fileExtension)) {
+ $fileExtension = GalleryUtilities::getFileExtension($filename);
+ }
+
switch($fileExtension) {
case 'png':
$cmd = $this->_pnmCmd('pngtopnm');
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
__[ g a l l e r y - c h e c k i n s ]_________________________
[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic