aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo
Commit message (Collapse)AuthorAgeFilesLines
* strlen($this->imageString()) does not return the correct size when dealing ↵Mario Vavti2018-11-161-2/+2
| | | | | with os_storage images. use filesize() instead. (cherry picked from commit afc75af62f759181bbe6a806b523c6ca52126f5f)
* Update photo_driver.phpMax Kostikov2018-11-101-1/+1
|
* Fixed wrong value assign on compare with 0Max Kostikov2018-11-101-1/+1
|
* Preserve received image modification date on cachingMax Kostikov2018-11-091-11/+16
|
* remove image type double guess by checking HTTP headersMax Kostikov2018-11-081-23/+7
|
* Return image modification date using HTTP 'Last-Modified' and '304 Not ↵Max Kostikov2018-11-081-115/+159
| | | | Modified' on remote fetch for caching
* imagemagick preserves exif when scaling. GD does not. We do not want to ↵zotlabs2018-04-223-0/+19
| | | | preserve exif on thumbnails which we have rotated, as a browser reading the exif information could rotate them yet again. This checkin adds an abstract function to the generic photo driver which makes the behaviour consistent by stripping EXIF from imagick processed images. However, we will attempt to preserve any ICC colour profiles. See http://php.net/manual/en/imagick.stripimage.php
* use original exif_read_data() parameters which were lost in a regression; ↵zotlabs2018-03-141-1/+1
| | | | unset automatic nsfw category generated for Mastodon content warning posts, as people use CW as a spoiler mechanism 99% of the time and flagging inappropriate content 1% of the time.
* somewhere along the line the output of exif_read_data() changed and it no ↵zotlabs2018-03-131-2/+2
| | | | longer provides populated sections. Adjust for the new format and allow for the old because I cannot find documentation of this change anywhere. This affects photo rotation and the photo map feature.
* allow toggle to 'SMBC' scaling mode. 'SMBC' mode is named thusly for ↵zotlabs2017-11-211-3/+10
| | | | Saturday Morning Breakfast Cereal cartoons which are very tall. If you scale the image to constrain both dimensions, the cartoon text is illegible. So we allow the height to float and only constrain the width. The new flag allows you to overide this mode and force both dimensions to always be evaluated and constrained to the provided limit.
* text thumbnails in cloud tile modezotlabs2017-11-191-47/+62
|
* sort out a few more large image upload issueszotlabs2017-11-141-4/+12
|
* ensure we have an observer hashzotlabs2017-10-031-1/+1
|
* hubzilla issue #868zotlabs2017-10-031-0/+21
|
* provide default photo mimetypezotlabs2017-09-201-0/+1
|
* provide a hook for importing a channel photo at channel creation timezotlabs2017-09-141-0/+30
|
* some doco fixes and other real minor stuff to improve logreading abilityzotlabs2017-08-091-2/+2
|
* guess_image_type - ignore scheme when checking for urlszotlabs2017-06-251-1/+1
|
* mastodon reshares can be either posts or comments; silence warning from ↵zotlabs2017-06-251-1/+11
| | | | guess_image_type when handed a URL to a non-existent resource.
* whitespacezotlabs2017-06-051-3/+5
|
* cleanup onlyzotlabs2017-05-311-3/+2
|
* photo size-0 issuezotlabs2017-04-071-0/+1
|
* add os_path and display_path to photos, fix some issues with multiple path ↵zotlabs2017-03-141-86/+2
| | | | separators after cloud/nickname in the content field of attach and photos
* do not choke if photo_factory() returns nullMario Vavti2017-01-151-1/+3
|
* correct encodingzotlabs2016-10-231-2/+2
|
* remove the rest of the backticks from sql queries; replace with TQUOT const ↵zotlabs2016-10-121-50/+50
| | | | which is driver dependent
* issue #526redmatrix2016-09-221-2/+9
|
* issue #519redmatrix2016-09-201-2/+5
|
* the rest of the schema updates - WARNING: some third party plugins may fail; ↵redmatrix2016-06-011-25/+25
| | | | e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files.
* code cleanupredmatrix2016-05-241-5/+1
|
* deprecate $a->get_baseurl()redmatrix2016-03-301-6/+6
|
* some initial work on uploading and cropping cover photosredmatrix2016-01-133-0/+38
|
* issue #154redmatrix2015-11-121-0/+11
|
* make sure we only have one profile photo for a cloned channelMario Vavti2015-11-011-1/+6
|
* fix photo item for search_item.tpl and a minor css fixMario Vavti2015-10-301-1/+1
|
* move it upMario Vavti2015-10-291-1/+1
|
* possibly better fox for profil photo image type issueMario Vavti2015-10-291-5/+1
|
* re-enable pathinfo() check and try with getimagesize() if we have not got a ↵Mario Vavti2015-10-281-3/+2
| | | | result
* pathinfo() does not work in this case. getimagesize() seems more reliabel. ↵Mario Vavti2015-10-281-0/+8
| | | | this fixes transparent png avatars having a black background.
* import_xchan_photo: check the return headers to ensure it's an image ↵redmatrix2015-09-261-45/+63
| | | | content-type of some form as imagick chucks a wobbly if you try to initialise an image with an html error page.
* initial work on obj import, rename import_profile_photo to ↵redmatrix2015-09-011-3/+3
| | | | import_xchan_photo to more accurately state its purpose.
* fix photo locationredmatrix2015-08-191-1/+2
|
* Merge branch 'master' of https://github.com/redmatrix/redmatrixredmatrix2015-07-211-4/+4
|\ | | | | | | | | Conflicts: doc/to_do_code.bb
| * Fixes regarding the new default profile photo size. The default profile ↵Mario Vavti2015-07-201-4/+4
| | | | | | | | photos are just renamed. People which provided the originals are invited to reproduce them in the new 300 by 300 px format.
* | more work on photos, including os_storage for the size '0' photo and ↵redmatrix2015-06-231-5/+12
| | | | | | | | numbering duplicate filenames
* | vsprintf errorredmatrix2015-05-181-1/+1
| |
* | bring the new photo schema into playredmatrix2015-05-181-21/+13
|/
* started to add the ability to geotag photos (default will be disabled) but ↵friendica2015-03-161-2/+9
| | | | my phone isn't outputting the GPS tags even after being explicitly enabled so I'll have to wait until I've got a device that I can reliably test against.
* PostgreSQL support initial commitHabeas Codice2014-11-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were 11 main types of changes: - UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just copied from Friendica. All of these instances, the LIMIT 1 was simply removed. - Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice to boot). Proper explicit boolean conversions were added. New queries should use proper conventions. - MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_ func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There were no true toggles (XOR). New queries should refrain from using XOR when not necessary. - There are several fields which the schema has marked as NOT NULL, but the inserts don't specify them. The reason this works is because mysql totally ignores the constraint and adds an empty text default automatically. Again, non-compliant, obviously. In these cases a default of empty text was added. - Several statements rely on a non-standard MySQL feature (http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run a zillion times faster, even on MySQL. - A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG, UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_ - INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes around the value -- assist functions added in the dba_ - NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are handled in Zot/item packets automagically by quoting all dates with dbescdate(). - char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype for all text fields in the postgres schema. varchar was used in a couple of places where it actually seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code actually validates data, new bugs might come out from under the rug. - postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted. bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function was added to handle this transparently. - postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax. Statements were updated to be standard. These changes require corresponding changes in the coding standards. Please review those before adding any code going forward. Still on my TODO list: - remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting - Rewrite search queries for better results (both MySQL and Postgres)
* Revert "x"habeascodice2014-10-111-1/+0
| | | | This reverts commit f84453497bd5ef4eba8bca84917b8e82d784937a.