Comments (12)
so what exactly does your code look like??
On Thu, Feb 27, 2014 at 6:58 AM, Kekke88 [email protected] wrote:
Hello, I've been trying to add an image upon a GIF image using your
libraries.However, it turns the gif image into some weird blue color.
I have tried to debug but I can't find what's wrong, I tried using
getResult with a background color but it still didn't help.I printed the frames as images and it seems that image #2https://github.com/Sybio/ImageWorkshop/pull/2is the first image to get weird colors.
Here is the picture before:
http://i.imgur.com/M3bM7yP.gifand after:
http://i.imgur.com/lyMu2P0.gifRegards
Reply to this email directly or view it on GitHubhttps://github.com//issues/36
.
from imageworkshop.
please also attach the images as pieces so we can try to duplicate your error. thank you.
from imageworkshop.
[code]
extract($gifPath); ``` $watermarkLayer = ImageWorkshop::initFromPath('wm.png'); $retouchedFrames = array(); //$it = 0; foreach ($frames as $frame) { $frameLayer = ImageWorkshop::initFromResourceVar($frame['image']); $frameLayer->resizeInPixel($frameLayer->width, $frameLayer->height, false); $frameLayer->addLayerOnTop($watermarkLayer, 20, 20, 'LB'); $image = $frameLayer->getResult(); // Creating all the GIF Images //imagejpeg($image, 'test' . $it . '.jpg', 95); $retouchedFrames[] = $frameLayer->getResult(); //$it++; } // Then we re-generate the GIF $gc = new GifCreator(); $gc->create($retouchedFrames, $gfe->getFrameDurations(), 0); // And now save it ! file_put_contents('newgif.gif', $gc->getGif()); } ``` ?>[/code]
from imageworkshop.
I've also tried using a color in the getResult as suggested but to no avail.
from imageworkshop.
I think you may need to may a group layer for the addLayerOnTop to work properly. also it looks like you may be working with a true color and non true color images (gif, png) you could try converting the png to a palette with imagetruecolortopalette() function.
from imageworkshop.
As I said in my first post, it doesn't matter if I add the watermark or not, it still gets that blue color.
from imageworkshop.
you could try saving each image after each step to find out when the blue's added. also the resize is pointless, your resizing it to it's current size.
from imageworkshop.
I have tried saving them after each step as I said in my first post, the blue gets added to the second image.
I tried without resize function but the image just becomes a 24kb file that I can't view.
from imageworkshop.
try:
extract($gifPath); // Then we re-generate the GIF $gc = new GifCreator(); $gc->create($frames, $gfe->getFrameDurations(), 0); // And now save it ! file_put_contents('newgif.gif', $gc->getGif()); } ?>to check that it is the image workshop and not the extractor / gif merge process.
from imageworkshop.
I get the following error from using your code:
Notice: Undefined variable: mode in C:\xampp\htdocs\gifwm\GifCreator.php on line 120
Fatal error: Uncaught exception 'Exception' with message 'GifCreator: Under development: You have to give resource image variables, image URL or image binary sources in $frames array. ()' in C:\xampp\htdocs\gifwm\GifCreator.php:120 Stack trace: #0 C:\xampp\htdocs\gifwm\new.php(52): GifCreator->create(Array, Array, 0) #1 {main} thrown in C:\xampp\htdocs\gifwm\GifCreator.php on line 120
from imageworkshop.
I have the same problem. Refreshing and ask for help
from imageworkshop.
Hi,
I've just make some test about this issue. The bug is not located in the ImageWorkshop library.
It is a GifFrameExtractor library bug, due to some transformation for extracting each GIF frame (in GifFrameExtractor::extract
method in frame loop).
So I close this issue and open a issue in the appropriated repository.
Thanks for your feedback.
from imageworkshop.
Related Issues (20)
- Move documentation to github repo HOT 4
- Fatal error: Uncaught Error: Class 'PHPImageWorkshop\Core\ImageWorkshopLayer' HOT 11
- Issue release in packageist HOT 1
- Right align text HOT 1
- Documentation Issues
- How to write Multi Line text
- GifCreator doesn't work
- White or Black bars with PNG and transparent background
- Webp support HOT 4
- Opening an optimized PNG (256 colors) result a grey block HOT 1
- Is it possible to wrap text to certain width ??
- GifCreator and global color palette?
- resizeToCover, like in css?
- PHP8 uses GDImage object instead resource HOT 4
- PHP Fatal error: Uncaught Error: Class "packages\PHPImageWorkshop\ImageWorkshop" not found HOT 1
- Problems with php 8.1 HOT 3
- Fix in convertHexToRGB method HOT 2
- Php Image Workshop supporting 8.1.13 or not HOT 1
- PHP deprecated function convertHexToRGB at php 8.1 HOT 7
- Working with grayscale png images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imageworkshop.