Commit graph

32 commits

Author SHA1 Message Date
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
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +00:00
Tim Starling
5fab6548f4 Fixed metadata format 2007-04-20 21:35:27 +00:00
Tim Starling
b15d8cffc4 * Introduced media handler modules for file-type specific operations: thumbnailing, img_metadata, capabilities, etc.
* Deprecated $wgUseImageResize, thumbnailing will be enabled unconditionally.
* Fixed interaction of page parameter to ImagePage with the HTML file cache
* Improved error reporting for image thumbnailing
* Fixed MIME type for SVG files, will be silently changed from image/svg to image/svg+xml after loading from the database.
* Workaround for djvutoxml bug #1704049 (poor performance). Use djvudump instead.
* Fixed odd behaviour in ImagePage on DjVu thumbnailing errors
* Improved error reporting for image thumbnailing
* Added sharpening option for ImageMagick thumbnailing
* Removed Image::selectPage(), added page parameters to getWidth() and getHeight(), deprecated Image::renderThumb() and Image::getThumbnail()
* Changed default contents of img_metadata to empty string instead of a:0:{}
* Moved responsibility for respecting $wgGenerateThumbnailOnParse from the UI to Image.php
2007-04-20 12:31:36 +00:00