- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
case 5: {
$im = imagecreatetruecolor(1024, 1024);
imagefill($im, 0, 0, imagecolorallocate($im, 255, 255, 255));
imagecopymerge($im, imagecreatefromjpeg("core/temp/0.jpg"), 0, 0, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/1.jpg"), 0, 255, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/2.jpg"), 0, 510, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/3.jpg"), 0, 765, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/4.jpg"), 255, 0, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/5.jpg"), 255, 255, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/6.jpg"), 255, 510, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/7.jpg"), 255, 765, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/8.jpg"), 510, 0, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/9.jpg"), 510, 255, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/10.jpg"), 510, 510, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/11.jpg"), 510, 765, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/12.jpg"), 735, 0, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/13.jpg"), 735, 255, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/14.jpg"), 765, 510, 0, 0, 255, 255, 100);
imagecopymerge($im, imagecreatefromjpeg("core/temp/15.jpg"), 765, 765, 0, 0, 255, 255, 100);
imagepng($im, "core/".$name_tovar."/1.png");
$im2 = imagecreatetruecolor(1024, 1024);
imagefill($im2, 0, 0, imagecolorallocate($im2, 255, 255, 255));
imagecopymerge($im2, imagecreatefromjpeg("core/temp/16.jpg"), 0, 0, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/17.jpg"), 0, 255, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/18.jpg"), 0, 510, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/19.jpg"), 0, 765, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/20.jpg"), 255, 0, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/21.jpg"), 255, 255, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/22.jpg"), 255, 510, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/23.jpg"), 255, 765, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/24.jpg"), 510, 0, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/25.jpg"), 510, 255, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/26.jpg"), 510, 510, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/27.jpg"), 510, 765, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/28.jpg"), 735, 0, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/29.jpg"), 735, 255, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/30.jpg"), 765, 510, 0, 0, 255, 255, 100);
imagecopymerge($im2, imagecreatefromjpeg("core/temp/31.jpg"), 765, 765, 0, 0, 255, 255, 100);
imagepng($im2, "core/".$name_tovar."/2.png");
// еще строк 60
imagepng($im5, "core/".$name_tovar."/5.png");
}
..и так далее.
Прислал знакомый с комментарием:
[18:18:48] брал 16 картинок
[18:18:52] нужно было склеить в одну
[18:19:04] ну и эти 16 картинок спарсить и т.д. и т.п.
Это, как бы, только один кейс. Там таких 6, в 6 вообще чертовщина ужасная строк на 200.
Всё это чудо занимает 858 строк несвежего кала весом в ~80кб.