Giter Site home page Giter Site logo

Comments (12)

GoodLittleDev avatar GoodLittleDev commented on July 27, 2024

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.gif

and after:
http://i.imgur.com/lyMu2P0.gif

Regards

Reply to this email directly or view it on GitHubhttps://github.com//issues/36
.

from imageworkshop.

GoodLittleDev avatar GoodLittleDev commented on July 27, 2024

please also attach the images as pieces so we can try to duplicate your error. thank you.

from imageworkshop.

Kekke88 avatar Kekke88 commented on July 27, 2024

[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]

Before:
teac

After:
newgif

from imageworkshop.

Kekke88 avatar Kekke88 commented on July 27, 2024

I've also tried using a color in the getResult as suggested but to no avail.

from imageworkshop.

GoodLittleDev avatar GoodLittleDev commented on July 27, 2024

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.

Kekke88 avatar Kekke88 commented on July 27, 2024

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.

GoodLittleDev avatar GoodLittleDev commented on July 27, 2024

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.

Kekke88 avatar Kekke88 commented on July 27, 2024

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.

GoodLittleDev avatar GoodLittleDev commented on July 27, 2024

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.

Kekke88 avatar Kekke88 commented on July 27, 2024

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.

KasztaN9 avatar KasztaN9 commented on July 27, 2024

I have the same problem. Refreshing and ask for help

from imageworkshop.

jdecool avatar jdecool commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.