I looked at the documentation for the GD package, and I could not find the constructor named GD::Image->newFromJpegData. I also checked the code of the GD package. There is no such function. The only constructor/function I can see that's similar is GD::Image->newFromJpeg, which you mentioned. Have you tried using it instead?