Reputation: 485
So I'm trying to generate few images via imagick operations.
$this->image->writeImage("img/new.jpg");
$this->image->writeImage($location);
This code will write me 2 images, the first one is OK, but the second one ($location
is set to img/kopanky.jpg
) will create image too, but with name kopanky.jpg?
. It doesn't matter how I name it, where I place it, but it happens only when I'm using a variable. The second image looks like the first one, but the question mark in the filename annoys me.
I tried writeImageFile
with fopen
too.
Upvotes: 2
Views: 211
Reputation: 28111
I'm pretty sure your $location
string contains a special character at the end, which is translated to ?
on save.
To verify this, add a var_dump($location);
to that part of your code and see what's in the string.
Upvotes: 2