Commit graph

153 commits

Author SHA1 Message Date
Siebrand Mazeland
d4b046a893 Update docs for return and exception info
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
2012-10-09 09:41:58 +00:00
jarry1250
2ae2c36154 Convert core to use new ThumbnailImage() constructor
See change #21321 for the introduction of that new constructor
and the reasoning behind it.

Change-Id: I15843fab4217333077e16ae187e7c09f76d47e58
2012-09-01 17:12:48 +01:00
Siebrand Mazeland
4e1ccf0267 Replace deprecated wfMsg* calls with Message class calls.
Doing this in steps of roughly 100 changes per commit, so that it remains reviewable.

Change-Id: I4950fdf8be669b52446290768ece0b8df8399d5d
2012-08-20 22:52:17 +02:00
Siebrand Mazeland
9ff9aaae63 Fix typo: occured -> occurred.
Change-Id: I5e66fdd52791487f81796ae1965ac31c94b36182
2012-08-10 10:59:55 +02:00
Antoine Musso
12e608e3d5 converts '@fixme' to '@todo FIXME'
@fixme is simply not recognized by doxygen whereas @todo is used to
generate a nice ... todo list!!

Change-Id: If956c0a164373126ce48b791d45c56962034eecd
2012-07-10 17:16:46 +02:00
Alexandre Emsenhuber
31003d22ea Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I26a320bcddd4122ce423f536609d5794446d743e
2012-05-03 22:22:45 +02:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Aaron Schulz
436e730336 Deferred File::getLocalRef() in BitmapHandler and altered MediaTransformOutput to compensate. They were getting called on every getTransform() call, which are triggered by just looking at pages with files (like Special:ListFiles). This made page loads very slow for non-FS backends. 2012-02-01 04:44:08 +00:00
Niklas Laxström
0324d70ee5 Rm extra space 2012-01-22 12:16:47 +00:00
Aaron Schulz
5fdac785a3 In SpecialUploadStash:
* Updated outputLocallyScaledThumb() and outputLocalFile() to handle changes in r106752.
In MediaTransformOutput:
* Added a storage path field to the transformation output object and set it in  File::maybeDoTransform().
In File:
* Fixed maybeDoTransform() handling if repo member is not set and made it fully respect $wgIgnoreImageErrors.
In BitmapHandler:
* Don't set bogus path if TRANSFORM_LATER in doTransform() for deffered renderings.
2012-01-05 01:58:05 +00:00
Mark A. Hershberger
d93ece3527 * First simple XCF thumbnailing. Convert from ImageMagick has buggy
support for XCF, though, so one of the solutions at
  http://stackoverflow.com/questions/5794640/how-to-convert-xcf-to-png-using-gimp-from-the-command-line
  is probably better.

* File::maybeDoTransform() since (at least) r106752 neglects what
  BitmapHandler::getThumbType() returns, so add support for that.

* Add $wgImageMagickIdentifyCommand to avoid writing a parser for XCF
  metadata.
2011-12-27 00:46:44 +00:00
Mark A. Hershberger
e6e0baefe4 w/s 2011-12-27 00:28:23 +00:00
Aaron Schulz
5275f9b097 Merged FileBackend branch. Manually avoiding merging the many prop-only changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development. 2011-12-20 03:52:06 +00:00
Sam Reed
1e2add934a Fix version check version from r105559 2011-12-08 18:07:26 +00:00
Sam Reed
16b878fdb6 Bug 32874 - Bitmap.php uses -define in ImageMagick configuration line which requires ImageMagick 6.5.6-2 but doesn't do a version check
"Patch"/Idea provided by Christian Neubauer
2011-12-08 16:18:18 +00:00
Tim Starling
33f8a6476c Fix for r101677: remove the extra parameters from the other getImageArea() callers. 2011-11-28 04:40:31 +00:00
Tim Starling
5b72053fb9 Fix for r99911: don't use getImageArea() to determine the area for comparison against $wgMaxImageArea, this breaks the $wgMaxAnimatedGifArea feature completely. 2011-11-28 04:37:15 +00:00
Bryan Tong Minh
eac3d58b44 Per comments on r99911 move $wgMaxImageArea check back to normaliseParams(). Added hook BitmapHandlerCheckImageArea to override the area check. I'm not very happy with this overly specific hook, but I don't see a clear way to obtain the functionallity required otherwise.
Remove the width and height params from BitmapHandler::getImageArea(). There is really no reason for them to be there.
2011-11-02 20:48:50 +00:00
Sam Reed
9d41b95053 Kill various unused variables
Comment some out also

Add some bits of documentation
2011-10-29 01:17:26 +00:00
Bryan Tong Minh
b6129dcde5 Per bug 28135, disable $wgMaxImageArea check when transforming using a hook, and enable the check for non IM scalers. 2011-10-15 20:36:02 +00:00
Bryan Tong Minh
11cfbad55c (bug 31487) Don't specify -auto-orient, but specify image rotations ourselves 2011-10-07 18:48:36 +00:00
Tim Starling
b9fcd0c14a Removed the redundant wfMkdirParents() call added to BitmapHandler::doTransform() in r79845. This causes problems on Wikimedia due to incorrect NFS access. If a sysadmin misconfigures their thumbnail destination directory, they should get a helpful error message, it shouldn't transparently fall back to client-side scaling and cache the resulting HTML forever. 2011-09-22 03:37:39 +00:00
Brion Vibber
cad88cae9a * (bug 6672, 31024) Fixes for handling of images with an EXIF orientation
- sets an image's reported width/height to the logical form (portait image reports itself as portait)
- everything works in logical coordinates when sizing -- we don't touch the physical pre-rotation dimensions again until it's actual low-level resize time. This fixes several problems with incorrect thumb sizing (eg getting a 600x800 image when we asked for something that fits in 800x600 box)
- fixes unit test cases in ExifRotationTest that were reporting that the width/height were coming back with the physical form which we don't want
- removes some test cases on ExifRotationTest that tested dimension swapping in a place where we don't want it
- ensures that only logical width/height need be exposed to API etc, making exif-rotated images work via ForeignAPIRepo

Note that this may actually cause file metadata to get loaded twice during File::getPropsFromPath, as the $image parameter it passes in to the handler's getImageSize function is bogus and can't be used to fetch an already-loaded metadata blob. This should not generally be too expensive though; it's not a fast path.

Rotated files that were uploaded under previous versions may still have their width/height reversed; an action=purge on the file page will refresh it and cause thumbs to be regenerated.

Follows up on r79845, r90016, r92246, r92279, r96687, r97651, r97656, r97659.

Needs merge to 1.18.
2011-09-20 22:13:34 +00:00
Brian Wolff
57228556e6 (bug 30640; follow-up r92279) Rotating images was making skewed images
This is Bryan's patch from bug 30640 with a couple minor related changes, plus some unit tests.
This also addresses an issue with preventing too-big images from being scaled from r92279.

I also noticed that image magick's rotation support is broken in 6.3.7 (the version I had installed locally. I've since upgraded) I'm not sure if we should be doing something about that...

I did test this without both image magick, and gd (although only very briefly with gd) both seemed to work well. I didn't test any other image scalars.
2011-09-09 20:13:09 +00:00
Daniel Friesen
c366b50344 Followup r93157, missing another one of the stray )'s. 2011-07-26 03:36:27 +00:00
Daniel Friesen
40989c2668 Followup r93132, misplaced ) caused 'dirname() expects exactly 1 parameter, 3 given' error. 2011-07-26 02:44:27 +00:00
Sam Reed
66e01d1bb7 Adding __METHOD__ to parameters passed to wfMkdirParents() 2011-07-25 22:01:19 +00:00
Bryan Tong Minh
0222e58b9f (bug 28762) Resizing to specified height broken for very thin images
Restructure and comment of ImageHandler::normaliseParams(). ImageHandler::normaliseParams() will now output both width/height as physicalWidth/Height, where width/height are the dimensions used by the browser, and physicalWidth/Height are the dimensions of the thumbnail that will be created. This allows keeping the use of unique dimensions for a specified thumbnail width, by forcing client side resizing of 1px-wide images with non corresponding height.
Also fixed a bug where the check for mustRender() was in an if statement where it should not have been.
2011-07-15 19:03:40 +00:00
Bryan Tong Minh
64ef056784 Follow-up r79845: Fix rotation. Turns out that we need to pass the pre-rotation dimensions to convert.exe. Also added tests. 2011-07-15 15:13:18 +00:00
Aaron Schulz
3c30666ea1 * Changed @ => wfSuppressWarnings
* Added wfSuppressWarnings to Bitmap.php:
Notice: unserialize(): Error at offset 0 of 2 bytes in D:\www\MW_trunk\phase3\includes\media\Bitmap.php on line 685
2011-05-25 00:25:29 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Mark A. Hershberger
653fa75fb3 Provisional fix for Bug #28631 to remove artifacts from GIF. This
seems better in my (very) limited testing than leaving it in, but I'd
like to get more tests.
2011-04-28 20:18:32 +00:00
Brian Wolff
19a66a3238 Remove the JPEG/TIFF specific metadata code from BitmapHandler and put it in JpegOrTiff handler
to stop mostly irrelevent classes from getting it.

Also remove a method that is an exact duplicate of a base class (not sure whats with that).

This also coincidently fixes the issue with when a foreign file repo uses PagedTiffHandler
and the local one does not, and the builtin Tiff handler tries to treat the metadata as if
it was its own form.
2011-04-20 23:15:13 +00:00
Sam Reed
1f86001203 Few more comment/whitespace issues from r86169 2011-04-18 13:18:15 +00:00
Sam Reed
0bd50926ca Remove some unused variables
Fix typo in wfDeprecated usage

Fix some more unreachable code
2011-04-16 11:17:14 +00:00
Brian Wolff
74f16767e7 Merge to trunk everything in img_metadata branch.
Hope I did this in an ok fashion. svn merge --re-integrate was giving me issues
so I just essentially over-wrote my working copy with the version at img_metadata.
2011-04-16 01:23:15 +00:00
Bryan Tong Minh
ef3c0a92b4 Added hook BitmapHandlerTransform to allow extension to transform a file without overriding the entire handler. 2011-03-18 22:28:19 +00:00
Bryan Tong Minh
18403736f2 Follow-up r83792: Remove left in debugging 2011-03-12 22:51:45 +00:00
Bryan Tong Minh
5e909e8090 Follow-up r83778: Need to de-rotate, so use 360 - angle instead of angle. 2011-03-12 22:50:43 +00:00
Bryan Tong Minh
8ca4667339 Fix switch fail in r83778: add missing break. 2011-03-12 21:35:27 +00:00
Bryan Tong Minh
634594c039 (bug 14706) Added support for the Imagick PHP extension. Based on patch by Leslie Hoare.
Scaler type is "imext". Rotation is supported.
Logic mostly copied from transformImagemagick() and ported to Imagick calls.
Resizing animated gifs is broken; it only shows the first frame and I can't find out why it does not work, but otherwise it is fully working.
2011-03-12 19:32:39 +00:00
Bryan Tong Minh
569546c59b (bug 27809) Check for availability of imagerotate function before using it 2011-03-02 19:42:30 +00:00
Sam Reed
dfcc5bb7fc Parameter documentation 2011-02-18 23:34:24 +00:00
Bryan Tong Minh
de79cb9cde Follow-up r79867: Read out EXIF orientation in JavaScript and rotate accordingly. Added JsJpegMeta library by Ben Leslie under the MIT license.
* Added JS variabele wgFileCanRotate. If anybody knows a way to make certain variables only available to certain modules, please tell me, could not find it.
* Added JsJpegMeta as mediawiki.util.jpegmeta
* Made BitmapHandler::getScaler and BitmapHandker::canRotate static
* Bumped style version
2011-01-22 22:34:36 +00:00
Platonides
9cd7bab807 Follow up r79845. No need to keep $wgCustomConvertCommand there. 2011-01-12 00:30:42 +00:00
Bryan Tong Minh
a00a681a5c Follow-up r79845: add function documentation; only call wfMakeDirsParent if we have a dest path.
On r79845 I submitted a wrong commit summary, here is it for reference:

(bug 6672) Images are now autorotated according to their EXIF orientation. Following the Flickr example, this only affects thumbnails, with the source unrotated.

* Introduced BitmapHandler::canRotate() and BitmapHandler::getRotation() to check if rotation is supported and what the amount of rotation is
* Factored out scaler determination into BitmapHandler::getScalerType()
* ImageMagick uses the -auto-orientation option
* GD uses imagerotate()
* Unconditionally show the thumb size on the image page, don't know why this wasn't shown for SVGs etc.
2011-01-08 11:49:09 +00:00
Bryan Tong Minh
02d3b7ad1d $wgMaxUploadSize may now be set to an array to specify the upload size limit per upload type.
Backwards compatible, if not set to an array, applies to all uploads. If set to an array, per upload type maximums can be set, using the file and url keys. If the * key is set this value will be used as maximum for non-specified types.
2011-01-07 22:12:05 +00:00
Platonides
52598e6d38 Follow up r75705 typo. 2010-12-05 15:35:57 +00:00
Roan Kattouw
04e618aad7 Fix r77261 by adding the parentheses already added in 1.16wmf4 in r77264 2010-11-25 12:34:21 +00:00
Roan Kattouw
f73704c36b Fix strange bug in ImageMagick call: if $params['comment'] was set to '' (which is explicitly done by the code in certain cases), the command line will contain -set comment -depth 8, causing the comment to be set to '-depth' and the file '8' to be read. Fix this by not adding the -set comment part at all if the comment is empty 2010-11-24 22:50:46 +00:00
Bryan Tong Minh
77304b8cc2 Follow-up r75702: change physicalSize to physicalDimensions per CR; commented getMediaTransformError function 2010-10-30 20:02:53 +00:00
Bryan Tong Minh
46b5bdfa2c Follow-up r75702: stylize 2010-10-30 19:11:30 +00:00
Bryan Tong Minh
ce7f6ec540 Split BitmapHandler::doTransform in functions: transformImageMagick(), transformCustom() and transformGd(). Pass their parameters as an options array. Put common code lines into separate functions such as getClientScalingThumbnailImage(), getMediaTransformError() and logErrorForExternalProcess(). Tested all three scalers, everything appears to be still working. 2010-10-30 19:04:26 +00:00
Platonides
3b30c2fa0e Provide a proper implementation for passing environment variables to wfShellExec()
The quick fix of r74821 is no longer needed.
2010-10-26 22:17:42 +00:00
Platonides
f91decf221 r71546 broke imagemagick usage in Windows, since cmd.exe takes the variable
names as the program name.
I'm just not exporting those variables here, but we need to support them in Windows, too.
We could use putenv() but that seems ugly (and risky). A better solution would be to have 
wfShellExec() call proc_open() with a modified environment.

A POSIX shell is required to accept variable assignments before the command so we shouldn't
have problems on any UNIX-like system.
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_01
2010-10-15 19:48:21 +00:00
Sam Reed
5583dacd0a Followup r72238, remove & 2010-09-03 16:00:58 +00:00
Sam Reed
9b52cb83b1 Add some $retval = '' before some wfShellExec 2010-09-02 22:15:20 +00:00
Tim Starling
93565e3f82 Fixes for new ImageMagick:
* (bug 24824) Support ImageMagick 6.5.6-2+ JPEG decoder size hint, to reduce memory usage when such an ImageMagick is used for scaling.
* Removed -size option since it doesn't act as a JPEG decoder size hint with recent ImageMagicks, and it may cause undesired behaviour in the future since it's documented to do something different now.
* Disable multithreaded behaviour in recent ImageMagick, to avoid a deadlock when a resource limit such as $wgMaxShellMemory is hit.
* Fixed some comments.

Replaces WMF live hack.
2010-08-24 08:48:46 +00:00
Derk-Jan Hartman
60ba8d53a7 Optimize a produced animated GIF with OptimizeTransparency, better would be to use optimize, but it breaks transparent GIFs. Fixes Bug 11822.
Only add animated gif options for animated gifs.
2010-08-20 13:37:20 +00:00
Derk-Jan Hartman
5a8ff385de Add getMagickVersion(). Will use this to provide optimization of animated gifs. 2010-08-20 13:22:02 +00:00
Ryan Kaldari
a6987c7781 reverting self (r71304) 2010-08-19 18:40:47 +00:00
Ryan Kaldari
1c6b47eb96 changing -sharpen to -unsharp due to new ImageMagick syntax, bug 24857 2010-08-19 18:21:06 +00:00
Alexandre Emsenhuber
320d4e1374 * Standardised file description headers
* Added some descriptions
2010-08-15 17:27:41 +00:00
Chad Horohoe
88fd6d25ab Don't use @, use wfSuppress/RestoreWarnings 2010-06-09 10:15:19 +00:00
Tim Starling
41a4e0ea85 More rigorous fix for ImageMagick parameter interpretation (bug 23148 etc.) based on examination of the source code, updating r64932. The source was large and complex and I might have missed some bits, but this is my best guess for now.
Tested bug 23148 and wildcards in filenames (was broken) using a patched convert. With a manual unit test (no convert), tested all branches of the new functions except wfIsWindows() == true.
2010-04-23 16:24:54 +00:00
Platonides
b378be4dd6 Follow up r64936. Even better, provide the bug number and imagemagick doc page. 2010-04-11 20:47:41 +00:00
Bryan Tong Minh
e8881b2a66 Follow up r64935: Add whitespace and clarify comment a bit more. 2010-04-11 13:59:01 +00:00
Bryan Tong Minh
879abd9113 Follow up r64932: Add comment on why % is escaped 2010-04-11 13:54:22 +00:00
Roan Kattouw
b8e3b0cb06 (bug 23148) Escape % in ImageMagick comments. Patch by Derk-Jan Hartman 2010-04-11 12:38:28 +00:00
Ilmari Karonen
9686c4bf20 (bug 23063) Reverse handling of $wgMaxImageArea and $wgMaxAnimatedGifArea: the former is now compared to the size of the first frame and the latter to the total size of all frames. Also increase default value of $wgMaxAnimatedGifArea to match $wgMaxImageArea. This change should not affect the thumbnailing of non-animated images in any way.
The way the logic and the defaults were before, it was basically impossible for animations with more than 12 frames to reach the "only thumbnail first frame" codepath; this surely cannot have been intended.
Also mention r64691 in release notes.
2010-04-07 05:41:44 +00:00
Ilmari Karonen
daba9d9160 allow display of unscaled image even if it exceeds $wgMaxImageArea (this can happen with animated GIFs, see bug 23063) 2010-04-07 05:17:19 +00:00
Raimond Spekking
3a188007c7 Follow-up r60175: Avoid PHP Notice: Undefined index: descriptionUrl in /var/www/w/includes/media/Bitmap.php on line 63 2009-12-17 22:54:55 +00:00
Raimond Spekking
c690e3c2af * (bug 19791) Add URL of file source as comment to thumbs (for ImageMagick) 2009-12-17 20:25:55 +00:00
Brion Vibber
787ff66c85 Revert image crop for now:
r54746 "Update formatting for r54745"
r54745 "Added crop support for inline images."
r54748 "Making demon happy (adding public/protected to function definitions) and add some comments along the way."

Several issues:
* Implementation is ImageMagick-specific, no support for GD backend
* Specification syntax is pretty ugly and non-obvious imo... [[File:foo.jpg|<width>px|<left>x<top>x<width>x<height]]
* Crop syntax seems to be tied to pixels... I _presume_ source pixels? This would break if a file is re-uploaded with a new size.
* In general I'm very leery of tacking on more infinite-options-in-infinte-combinations for image rendering; our treatment of resizing already has implications for CPU and disk usage and this just adds another level of arbitrary-rendered horror. ;)

I'd much rather we move towards limiting the number of rendered variants we have, not increase them... IMO cropping would be better served with an interface allowing for explicit, visible cropping which creates either a new saved version, or a 'cloned' virtual file which can be referred to by name... and more importantly, uses of it would be trackable so that if crops needs to be updated they can be cleanly.
2009-08-19 02:07:00 +00:00
Bryan Tong Minh
56d3a70695 Making demon happy (adding public/protected to function definitions) and add some comments along the way. 2009-08-10 21:16:33 +00:00
Bryan Tong Minh
bcb8ad6d6b Added crop support for inline images.
Syntax: [[File:foo.jpg|<width>px|<left>x<top>x<width>x<height]]
2009-08-10 21:02:24 +00:00
Andrew Garrett
e5343317b8 (bug 16451) Fix application of scaling limits for animated GIFs.
* Creates a new media handler for GIF files, and extracts metadata such as duration, whether or not the GIF is looped, and the number of frames.
* Uses the extracted metadata for the long file description.
* Considers number of frames in the calculation of image area (multiplies by width and height to get the "time-area", or so to speak).

After this patch is deployed, the work-around to disable GIF scaling on Wikimedia sites can be eliminated.
2009-08-03 15:01:51 +00:00
Tim Starling
88bc7329b7 Revert r49677, r50459, Brent G's patch for fixing GPS coordinates in EXIF. As I noted on CodeReview, there's a possibility it could crash the site on deployment. As much as it looks useful, I don't fancy spending part of my weekend rewriting it to preserve backwards compatibility, and the committer hasn't responded to the last couple of CR comments. 2009-06-06 15:48:06 +00:00
Ilmari Karonen
2364bc8edb fix regression from r49677 by refusing to format old-style metadata even if a foreign repo hands us some 2009-05-10 20:33:55 +00:00
Ilmari Karonen
4f738da210 Apply patch for bug 13172 by Brent G <overlordq@gmail.com> with minor modifications.
Also add pretty-printing of GPS coordinate values and correct display of altitude / destdistance reference values.
(We really should redesign the FormatExif class so that the "GPS*Ref" values can be combined with their parent values, but this will do for now.)
2009-04-20 22:29:40 +00:00
Raimond Spekking
e5fe5ab87a Follow up r49442: Make this new error message and two older error messages localizable. 2009-04-15 19:41:00 +00:00
Chad Horohoe
bee2293cbe If the file doesn't exist, we get a whole bunch of cascading PHP errors. 2009-04-13 15:05:47 +00:00
Andrew Garrett
0aadb0a8cc Tweak r47992 to use instead of a new configuration variable. Also moved its precedence higher to make its behaviour more logical. 2009-03-25 06:00:36 +00:00
Chad Horohoe
27f5871373 (bug 12970) Add global to force client rendering of thumbs. Helpful for victims of safe_mode which can break thumbnailing Very Badly. 2009-03-03 21:21:16 +00:00
Tim Starling
3078cab2ea * Set a special temporary directory for ImageMagick with $wgImageMagickTempDir 2008-11-02 16:45:52 +00:00
Brion Vibber
7a6f69f500 Quick hack: add $wgMaxAnimatedGifArea so we don't try to render animated thumbs for huge animated GIFs.
'Tugra Mahmuds II Big Size.gif' on Commons otherwise seems to eat as much CPU and memory as you can throw at it (1,876 × 1,500 pixel, file size: 4.36 MB, MIME type: image/gif)
2008-10-13 21:50:16 +00:00
Antoine Musso
d94ad6db95 Lets render BMP pictures to PNG. 2008-08-27 18:25:24 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Tim Starling
d9b1eb90ee Partial solution (quick hack) for bug 12970. 2008-02-27 07:06:32 +00:00
Tim Starling
497649c904 In OggHandler:
* Changed display style: added a "more" link which expands a box for player selection. 
* Allow return to the still image only display.
* Fixed Java detection in IE (I hope)

Elsewhere:
* Changed MediaTransformOutput::toHtml() parameters, now accepts a single associative array with well-defined elements. Allows OggHandler to distinguish between file download links and image description links. 
* Made image links consistently have an anchor tag with class=image, instead of a mixture of image and internalParse.
* Made most images have a border=0 attribute, instead of just images on the image description page. Does not appear to adversely affect display at all, it was just convenient. 
* Use the image name as the title attribute for the <a> tag, when an a caption was not given by the user
* Block centering by the auto margins method in ImageGallery
* Fixed complete breakage of the thumbnail on upload conflict feature
* TODO: test DjVu
2007-08-31 02:51:23 +00:00
Brion Vibber
3351a363e8 * Resizing transparent GIF images with GD now retains transparency by skipping
resampling
2007-08-23 18:28:21 +00:00
Tim Laqua
f93303f891 Fix f/ PNG-24 Alpha Transparency using GDLIB resizing 2007-08-22 00:30:16 +00:00
Brion Vibber
554b1d1f1f Hopefully fix the problem with EXIF field names being listed as <exif-exif-make> etc in the image table.
Since the type is already added to the sub-name, presumably the type ('exif') should not be added in again here.
2007-07-29 23:39:54 +00:00
Brion Vibber
c52b7de230 fix an immediate php error, but result is still wrong -- we get 'exif-exif-make' etc, since the tag already has 'exif' in the name. Something's broken, but not sure where 2007-07-29 23:37:14 +00:00
Tim Starling
5c4b57817b Committing some work in progress -- abstraction of handler-specific metadata formatting. The return format of MediaHandler::formatMetadata() might still need some tweaking, but I believe there is feature parity at this point. 2007-07-28 01:15:35 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Tim Starling
ed4303922f Merged filerepo-work branch:
* Added support for configuration of an arbitrary number of commons-style file repositories.
* Split Image.php into filerepo/File.php and filerepo/LocalFile.php
* Renamed Image::getImagePath() to File::getPath()
* Added initial support for timestamp-based file fetching (OldLocalFile), to be expanded upon by aaron.
* Changed the interface for Image/File object creation: use wfFindFile() or wfLocalFile() depending on semantics
* ImageGallery::add() now accepts a title object as the first parameter
* Moved file handling operations on upload from SpecialUpload to File
* Removed path-related functions from ImageFunctions.php. Removed static path accessors from File. 
* Added a Content-Disposition header to thumb.php output
* Improved thumb.php error handling
* Updated the unit test suite to kind of partially work with modern computers. RunTests.php doesn't work just yet. Fixed an actual regression that the test suite detected -- moved some defines to Defines.php where they will be loaded consistently.
2007-05-30 21:02:32 +00:00
Nick Jenkins
b4d37577b9 Removing or commenting out unused variables or globals, and adding declarations for two arrays. 2007-05-08 09:09:46 +00:00
Tim Starling
79fc909cf2 debugging 2007-04-27 09:43:20 +00:00