-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
¿Animated GIF support? #176
Comments
It's not possible at the moment, but would be nice to have. |
I also wanted this feature. For now, you can use another function to save when it is a gif, and keep using others from the library.
|
A great suggestion. At the moment I'm just copying the resource, but it'll be great to be able to crop an animated gif. |
As I understand this feature is already present in development branch. |
The development branch represents what will be the next major version (3.x). But it is currently under development and I would not use the branch for anything than development at all. Tag Currently there is no release date. This is a free open source project and I'm working on it in my spare time. |
@olivervogel thanks for clarification |
What is the current status here? |
make sure to use strtolower() on getClientOriginalExtension() as some images may have different casing on file extensions. |
https://github.com/glukash/glu-image support only laravel 4 need laravel 5.2 help me please |
system("convert big.gif -coalesce coalesce.gif"); |
Keep GIF animation for Imagick: $im = new \Imagick('path/to;image');
if ($im->getImageFormat() == 'GIF') {
$im = $im->coalesceImages();
do {
$im->resizeImage($resize['width'], $resize['height'], \Imagick::FILTER_BOX, 1);
} while ($im->nextImage());
$im = $im->deconstructImages();
} else {
$im->resizeImage($resize['width'], $resize['height'], \Imagick::FILTER_LANCZOS, 1, true);
}
$im->writeImages('some/path/to', true) For GD check animation: function is_animated($filename)
$filecontents = file_get_contents($filename);
$str_loc = 0;
$count = 0;
while ($count < 2) { // There is no point in continuing after we find a 2nd frame
$where1 = strpos($filecontents, "\x00\x21\xF9\x04", $str_loc);
if (!$where1) {
break;
} else {
$str_loc = $where1 + 1;
$where2 = strpos($filecontents, "\x00\x2C", $str_loc);
if (!$where2) {
break;
} else {
if ($where1 + 8 == $where2) {
++$count;
}
$str_loc = $where2 + 1;
}
}
}
return $count > 1;
} Maybe can help on slipt a GIF image: http://stackoverflow.com/a/12553165/4367683 More info: http://stackoverflow.com/a/718500/4367683 For animated GIFs, the Lib should split them before each method calls and iterates the frames, doing the action |
Any News? |
Any update for animated GIFs,? |
Still gif images are not supported |
Perhaps make a pull request to help them out, if this is so important? |
Up |
Yeah i'm in too. |
The code a pasted above is not usefull? |
Thanks, it's usefull! |
Image GD class that supports GIF manipulation: https://gist.github.com/odahcam/e7255f406e02ddf390080bf3add2cd43#file-imagegd-php-L4 |
Any plans for this? Gifs are a big part of the web these days... |
* Started draw.io integration * Updated pull-request info to be clearer Also updated dev version * Adds code to allow deletion of users via cmd line. Fixes BookStackApp#579 Command: php artisan bookstack:delete-users Signed-off-by: Abijeet <[email protected]> * Adds button to allow users to toggle the book view via the books list page. Closes BookStackApp#613 Signed-off-by: Abijeet <[email protected]> * Adds test cases and fixes an issue with the permission checking. Signed-off-by: Abijeet <[email protected]> * Enabled session in 404 responses Fixes #634 * Adds font-size to ol to ensure that they are uniform. Fixes BookStackApp#643 Signed-off-by: Abijeet <[email protected]> * Standardised admin role check * Updated book view change to PATCH + other amends Moved toggle to right of header bar and added unique text and icon for each view type. Removed old profile setting to keep things clean. * Enabled system-storage of drawings made via draw.io * Fixed broken table/ol/ul page includes Fixes BookStackApp#640 * Fixed failing book view test Also ensured setting system localcache is cleared correctly * Checks the target and the source book before performing the sort. Signed-off-by: Abijeet <[email protected]> * Changed the sort view to only show books to which we have an update permission. Signed-off-by: Abijeet <[email protected]> * Adds test case for sorting permissions. Signed-off-by: Abijeet <[email protected]> * Added view override support Relates to BookStackApp#652 * Refactored the code to first check for the permissions before sorting the book. Signed-off-by: Abijeet <[email protected]> * Adds overflow:auto to popup content to allow it to scroll in lower res. Fixes BookStackApp#650 Signed-off-by: Abijeet <[email protected]> * Added ability to secure images behind auth Still in testing. Adds STORAGE_TYPE=local_secure option for setting images to be behind auth. Stores images alongside attachments in /storage/uploads/images. * Refactored book sort using collections * Added drawing update ability * Added drawing icon and made drawio disablable * Extracted draw.io functionality to own file * Added drawio abilities to markdown editor * Added Swedish translation * Added Swedish locale to config * Added drawing endpoint tests Also refactored ImageTests away from BrowserKit Also added image upload type validation. * Fixed test failing from missing baseURL Also updated image upload test to delete before upload to prevent failed tests breaking subsequent tests. * Actually fixed the BaseURL this time 🤦 * #630: Deleting user's profile pics on deleting of user account (BookStackApp#646) * Issue-630: Fixed issue with deleting user profile pics when deleting a user. * Issue #630: Deleting user's profile pics on deleting of user account * Issue-630: Added test case for deleting user * Updated user profile image delete to delete all uploads Also moved test and made more comprehensive * Adapted code insert area and language select for mobile * Set /app PHP code to PSR-2 standard Also adde draw.io to attribution list. Closes BookStackApp#649 * Fixed validation issue on register post Added test to cover and also cleaned up RegisterController comments. Fixes #670 * Added command to add a new admin user Closes BookStackApp#609 * Set markdown editor preview width to 100% Fixes BookStackApp#658 * Add twitch socialite auth provider * Update... * add support for gitlab authentification * add missing lock file * Corrected the keys for okta auth * Update services.php * Update .env.example * reduced icon size * add missing icon, fix name conventions * Update all.blade.php * Made default books view configurable in .env Under 'APP_VIEWS_BOOKS' key. Closes BookStackApp#675 * Added simplified Chinese(zh-CN) language * Added 'zh_CN' to app.locales * Prevent image manager search from reloading page Fixes BookStackApp#697 * Fixed code block wrapping on export Now wraps instead of running off the page. Fixed BookStackApp#676 * Updated grid view to use CSS grid and flexbox Provides a cleaner height-matched design. Closes BookStackApp#701 * Updated twitch SVG icon with vector SVG * Fixed error when accessing non-authed attachment Also updated attachment tests to use standard test-case. Fixes BookStackApp#681 * Fixed text overflow in various views Fixes BookStackApp#669 * Tweaked some comments * Updated assets for release v0.20.0 * Made it possible to override icons via custom theme * Started migration to SVG icons * Finished migrated from icon-font to SVG * Updated 'Spanish Argentina' translation. * Added ability to configure email sender name Added env variable MAIL_FROM_NAME to allow the email sender name to be customised. Also added MAIL_FROM to .env.example * Updated 'Spanish Argentina' translation. * Add CACHE_PREFIX to the .env.example file We had some problems with multiple BookStack instances using the same caching server. Perhaps it's a good idea to have this available in the `.env.example` file. * fix markdown editor resizing with long strings * typo in readme.md * add missing polish translations for comments * Update .env.example * Attempted move to webpack again * Reorganised dev-deps and updated moment * Update Italian translation * Fixes issue with the validation message not being translated. Signed-off-by: Abijeet <[email protected]> * Finished off intitial conversion to webpack * Moved jQuery to use NPM and fixed some asset refs * Added togglable script escaping to page content Configurable via 'ALLOW_CONTENT_SCRIPTS' env variable. Fixes BookStackApp#575 * Updated exports to use DejaVu font Provides potentially better language font coverage. * Markdown editor image paste sets cursor correctly Now sets cursor to alt text rather than end of placeholder image. Fixed BookStackApp#751 * Prevented markdown editor pushing out toolbar * Fixed up notification styling a little * Fixed large content previews and improved mobile styles Listing content previews no longer pre-wrap and instead simply break correctly. Updated titles to ensure they break on mobile devices. Reduced spacing and font sizes on mobile to better adjust content to screen size. Fixes BookStackApp#739 * Fixes a number of issues with the image uploader. Read below, - Added a remove link to remove files that have an error. - Error will appear below the progress bar. - Hovering on dz-image or dz-details will display the error message. Otherwise error message was covering the remove link as well. - Removed styling around the file size. - Removed gradient effect in accordance with BookStack styling. - Dropzone filenae will not overflow the container element. Also done for page attachments - Added a 'uploaded' error message. this error was being thrown when the file size exceeded the server configured file size. (https://stackoverflow.com/a/42934387/903324) Towards BookStackApp#741 Signed-off-by: Abijeet <[email protected]> * Update activities.php * Update auth.php * Update common.php * Update components.php * Update settings.php * Fixes the icons not being aligned properly in attached items section for the page. Also formatting. Signed-off-by: Abijeet <[email protected]> * Update entities.php * Updated webpack SCSS extract to provide sourcemaps * Cleaned some form styling Removed uppercasing of labels to make a little friendlier. Extracted out toggleswitch JS into own component. Improved basic code input for html-head-input area. * Use autodiscover for dev packages Allows installation with `composer install --no-dev` Fixed BookStackApp#742 * Updated outline button styles for svg icons * Removing the selected image and clearing the dropdzone on dialog close. Towards BookStackApp#741 Signed-off-by: Abijeet <[email protected]> * Not resizing gif images. See - Intervention/image#176 Fixes BookStackApp#223 Signed-off-by: Abijeet <[email protected]> * Fixes an issue with handling of large image files. Signed-off-by: Abijeet <[email protected]> * update japanese translation * fix entities.php * Fixed failing tests Fixed syntax error in french translations. Removed 'required' on image validation which was breaking tests * Made search more efficient and tweaked weighting Added per-entity weighting changes. Now Books score higher than chapters which score higher than pages. Reduced queries required on search by only searching once but at a higher count to see if there's another page. * Fixed incorrect search logic in last commit Incorrect cross-entity pagination could lead to hidden entities. * Properly escaped search results Prevents vue-like syntax in results causing errors. Related to BookStackApp#748 * Updated create routes to prevent slug clashes Fixes BookStackApp#758 * Removed invalid bracket from view * Ensured uploaded system images remain public Also added tests to cover local_secure image storage. Fixes BookStackApp#725 * Updated icons with height Fixes issues within IE * Updated assets for release v0.20.1 * Fixed export style paths * Updated the version because i'm such a plonker And forgot to do this last release. I wonder if there's a simple commit hook that could prevent the same two versions twice in a row?
* Started draw.io integration * Updated pull-request info to be clearer Also updated dev version * Adds code to allow deletion of users via cmd line. Fixes BookStackApp#579 Command: php artisan bookstack:delete-users Signed-off-by: Abijeet <[email protected]> * Adds button to allow users to toggle the book view via the books list page. Closes BookStackApp#613 Signed-off-by: Abijeet <[email protected]> * Adds test cases and fixes an issue with the permission checking. Signed-off-by: Abijeet <[email protected]> * Enabled session in 404 responses Fixes #634 * Adds font-size to ol to ensure that they are uniform. Fixes BookStackApp#643 Signed-off-by: Abijeet <[email protected]> * Standardised admin role check * Updated book view change to PATCH + other amends Moved toggle to right of header bar and added unique text and icon for each view type. Removed old profile setting to keep things clean. * Enabled system-storage of drawings made via draw.io * Fixed broken table/ol/ul page includes Fixes BookStackApp#640 * Fixed failing book view test Also ensured setting system localcache is cleared correctly * Checks the target and the source book before performing the sort. Signed-off-by: Abijeet <[email protected]> * Changed the sort view to only show books to which we have an update permission. Signed-off-by: Abijeet <[email protected]> * Adds test case for sorting permissions. Signed-off-by: Abijeet <[email protected]> * Added view override support Relates to BookStackApp#652 * Refactored the code to first check for the permissions before sorting the book. Signed-off-by: Abijeet <[email protected]> * Adds overflow:auto to popup content to allow it to scroll in lower res. Fixes BookStackApp#650 Signed-off-by: Abijeet <[email protected]> * Added ability to secure images behind auth Still in testing. Adds STORAGE_TYPE=local_secure option for setting images to be behind auth. Stores images alongside attachments in /storage/uploads/images. * Refactored book sort using collections * Added drawing update ability * Added drawing icon and made drawio disablable * Extracted draw.io functionality to own file * Added drawio abilities to markdown editor * Added Swedish translation * Added Swedish locale to config * Added drawing endpoint tests Also refactored ImageTests away from BrowserKit Also added image upload type validation. * Fixed test failing from missing baseURL Also updated image upload test to delete before upload to prevent failed tests breaking subsequent tests. * Actually fixed the BaseURL this time 🤦 * #630: Deleting user's profile pics on deleting of user account (BookStackApp#646) * Issue-630: Fixed issue with deleting user profile pics when deleting a user. * Issue #630: Deleting user's profile pics on deleting of user account * Issue-630: Added test case for deleting user * Updated user profile image delete to delete all uploads Also moved test and made more comprehensive * Adapted code insert area and language select for mobile * Set /app PHP code to PSR-2 standard Also adde draw.io to attribution list. Closes BookStackApp#649 * Fixed validation issue on register post Added test to cover and also cleaned up RegisterController comments. Fixes #670 * Added command to add a new admin user Closes BookStackApp#609 * Set markdown editor preview width to 100% Fixes BookStackApp#658 * Add twitch socialite auth provider * Update... * add support for gitlab authentification * add missing lock file * Corrected the keys for okta auth * Update services.php * Update .env.example * reduced icon size * add missing icon, fix name conventions * Update all.blade.php * Made default books view configurable in .env Under 'APP_VIEWS_BOOKS' key. Closes BookStackApp#675 * Added simplified Chinese(zh-CN) language * Added 'zh_CN' to app.locales * Prevent image manager search from reloading page Fixes BookStackApp#697 * Fixed code block wrapping on export Now wraps instead of running off the page. Fixed BookStackApp#676 * Updated grid view to use CSS grid and flexbox Provides a cleaner height-matched design. Closes BookStackApp#701 * Updated twitch SVG icon with vector SVG * Fixed error when accessing non-authed attachment Also updated attachment tests to use standard test-case. Fixes BookStackApp#681 * Fixed text overflow in various views Fixes BookStackApp#669 * Tweaked some comments * Updated assets for release v0.20.0 * Made it possible to override icons via custom theme * Started migration to SVG icons * Finished migrated from icon-font to SVG * Updated 'Spanish Argentina' translation. * Added ability to configure email sender name Added env variable MAIL_FROM_NAME to allow the email sender name to be customised. Also added MAIL_FROM to .env.example * Updated 'Spanish Argentina' translation. * Add CACHE_PREFIX to the .env.example file We had some problems with multiple BookStack instances using the same caching server. Perhaps it's a good idea to have this available in the `.env.example` file. * fix markdown editor resizing with long strings * typo in readme.md * add missing polish translations for comments * Update .env.example * Attempted move to webpack again * Reorganised dev-deps and updated moment * Update Italian translation * Fixes issue with the validation message not being translated. Signed-off-by: Abijeet <[email protected]> * Finished off intitial conversion to webpack * Moved jQuery to use NPM and fixed some asset refs * Added togglable script escaping to page content Configurable via 'ALLOW_CONTENT_SCRIPTS' env variable. Fixes BookStackApp#575 * Updated exports to use DejaVu font Provides potentially better language font coverage. * Markdown editor image paste sets cursor correctly Now sets cursor to alt text rather than end of placeholder image. Fixed BookStackApp#751 * Prevented markdown editor pushing out toolbar * Fixed up notification styling a little * Fixed large content previews and improved mobile styles Listing content previews no longer pre-wrap and instead simply break correctly. Updated titles to ensure they break on mobile devices. Reduced spacing and font sizes on mobile to better adjust content to screen size. Fixes BookStackApp#739 * Fixes a number of issues with the image uploader. Read below, - Added a remove link to remove files that have an error. - Error will appear below the progress bar. - Hovering on dz-image or dz-details will display the error message. Otherwise error message was covering the remove link as well. - Removed styling around the file size. - Removed gradient effect in accordance with BookStack styling. - Dropzone filenae will not overflow the container element. Also done for page attachments - Added a 'uploaded' error message. this error was being thrown when the file size exceeded the server configured file size. (https://stackoverflow.com/a/42934387/903324) Towards BookStackApp#741 Signed-off-by: Abijeet <[email protected]> * Update activities.php * Update auth.php * Update common.php * Update components.php * Update settings.php * Fixes the icons not being aligned properly in attached items section for the page. Also formatting. Signed-off-by: Abijeet <[email protected]> * Update entities.php * Updated webpack SCSS extract to provide sourcemaps * Cleaned some form styling Removed uppercasing of labels to make a little friendlier. Extracted out toggleswitch JS into own component. Improved basic code input for html-head-input area. * Use autodiscover for dev packages Allows installation with `composer install --no-dev` Fixed BookStackApp#742 * Updated outline button styles for svg icons * Removing the selected image and clearing the dropdzone on dialog close. Towards BookStackApp#741 Signed-off-by: Abijeet <[email protected]> * Not resizing gif images. See - Intervention/image#176 Fixes BookStackApp#223 Signed-off-by: Abijeet <[email protected]> * Fixes an issue with handling of large image files. Signed-off-by: Abijeet <[email protected]> * update japanese translation * fix entities.php * Fixed failing tests Fixed syntax error in french translations. Removed 'required' on image validation which was breaking tests * Made search more efficient and tweaked weighting Added per-entity weighting changes. Now Books score higher than chapters which score higher than pages. Reduced queries required on search by only searching once but at a higher count to see if there's another page. * Fixed incorrect search logic in last commit Incorrect cross-entity pagination could lead to hidden entities. * Properly escaped search results Prevents vue-like syntax in results causing errors. Related to BookStackApp#748 * Updated create routes to prevent slug clashes Fixes BookStackApp#758 * Removed invalid bracket from view * Ensured uploaded system images remain public Also added tests to cover local_secure image storage. Fixes BookStackApp#725 * Updated icons with height Fixes issues within IE * Updated assets for release v0.20.1 * Fixed export style paths * Updated the version because i'm such a plonker And forgot to do this last release. I wonder if there's a simple commit hook that could prevent the same two versions twice in a row?
Any update on this? :) |
@olivervogel You mention above a development branch, but I can't seem to find it anywhere. Is it public? If so, where might one find it? And of course, thanks for this great package! |
Thanks @marcoflorian |
I am interested in this one as well. I see only the first frame is captured on resize, so for now will just copy GIF resources. |
@olivervogel, I know this is ancient, but are you still able to link to the development code that was referenced above? I'm not seeing anything anymore except for a For what it's worth: This is the first time I've looked at |
Still interested in animated gif support, this package is almost perfect, the lack of gif support does hurt though! |
As previous fella. :) |
How is this still not a thing? |
Is anybody actively working on this? Has there been any work done on this? Is there a branch that I could pick up? What's stopping it? Complexity and/or lack of developer motivation? Technical hurdles? |
I'm sad that this is still not implemented, 6 years later, and I cannot find any news concerning the Anyway, thanks for this great tool, it's still very useful if you don't have to handle gifs. I know it can be quite time consuming to develop an open-source project on your free time. |
We at Forus are also really interested in such a feature. |
Any updae? |
There will never be an update. Just use ImageMagick |
Ooh, I haven't looked for a while, but there are some encouraging signs:
@olivervogel Does this mean it's a good time for some alpha testers? |
@totten 3.0.0.alpha4 was released on Packagist this month, and contains explicit links to v3 documentation, so I think it's reasonable to assume that v3 is publicly available in alpha. |
Yeah it doesn't work with imagick either, at least not without a workaround, v3.0 will probably contain this feature though. So it's not never. https://image.intervention.io/v3/introduction/formats#gif
|
Version 3 supports animated images. |
Hello, I was wondering to know if it is possible to get and save an animated GIF, since when I try:
Image::make('mygif.gif')->save('images/mygif.gif);
It will become a "static" image, losing the animation.
Thanks in advance
The text was updated successfully, but these errors were encountered: