You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a laravel command to operate many images, something like that:
while (true) { // use while-true to simulate lots of images
foreach (Storage::files('tmp') as $file) {
echo $file, "\n";
$image = Image::make(storage_path('app/' . $file));
// $img = Image::make(storage_path('app/' . $file));
$img = clone($image);
$img->crop(200, 100);
// $this->some($img);
$image->insert($img);
$image->save(storage_path('tmp.png')); // without this save, grows much slower. It is another encode leaks issue I think.
$img->destroy(); // without these two destroy, script booms very quickly.
$image->destroy();
usleep(25);
}
}
The memory usage grows about 1M per second on my PC.
By the way, I am using GD2 driver on Windows. Maybe it's an issue of GD? I will try it on Linux later.
Anyidea?
The text was updated successfully, but these errors were encountered:
I wrote a laravel command to operate many images, something like that:
The memory usage grows about 1M per second on my PC.
By the way, I am using GD2 driver on Windows. Maybe it's an issue of GD? I will try it on Linux later.
Anyidea?
The text was updated successfully, but these errors were encountered: