[gallery/gallery3] c2d1c2: #1965 - Improve sanity checks and copy/convert/pro...

GitHub <noreply-9UaJU3cA/F/[email protected]>
Newsgroups gmane.comp.web.gallery.cvs
Message-ID <[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/gallery/gallery3
  Commit: c2d1c2407fdef326cd1f59d6852620f915a5c0e1
      https://github.com/gallery/gallery3/commit/c2d1c2407fdef326cd1f59d6852620f915a5c0e1
  Author: shadlaws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]>
  Date:   2013-01-25 (Fri, 25 Jan 2013)

  Changed paths:
    M modules/gallery/helpers/gallery_graphics.php
    A modules/gallery/tests/Gallery_Graphics_Helper_Test.php

  Log Message:
  -----------
  #1965 - Improve sanity checks and copy/convert/process logic for rotate and resize.
- resize: ensured that resize is skipped *only* if the metadata is valid or the options are well-defined and would upscale. Then, if resize is skipped, check to see if it still needs to be converted. Previous conditions would allow a small PNG to get copied to a JPG, and would allow a corrupted JPG to be copied to the output.
- rotate: add checks for empty file or empty options.
- use get_file_metadata instead of direct getimagesize call.
- add unit tests for rotate and resize, including some for corrupted input files and missing options.


  Commit: 96f4a5ea85fd4b4618002bdbd584effc4a86190e
      https://github.com/gallery/gallery3/commit/96f4a5ea85fd4b4618002bdbd584effc4a86190e
  Author: Bharat Mediratta <[email protected]>
  Date:   2013-01-25 (Fri, 25 Jan 2013)

  Changed paths:
    M modules/gallery/helpers/gallery_graphics.php
    A modules/gallery/tests/Gallery_Graphics_Helper_Test.php

  Log Message:
  -----------
  Merge pull request #103 from shadlaws/fix_1965

#1965 - Improve sanity checks and copy/convert/process logic for rotate and resize


Compare: https://github.com/gallery/gallery3/compare/066f4cdf8e44...96f4a5ea85fd

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d

__[ 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 ]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.