|
Модераторы: Aliance, skyboy, MoLeX, ksnk |
|
apostolnikolai |
|
|||
Бывалый Профиль Группа: Участник Сообщений: 152 Регистрация: 19.3.2009 Репутация: нет Всего: нет |
Здравствуйте!
Подскажите как на PHP можно разделить один графический файл на два, ровно по середине? Вот вариант кода, который это делает, но он чуть обрезает картинки на выходе и вырезанное закрашивает черным. Подскажите что не так
|
|||
|
||||
Vardoulacha |
|
|||
Бывалый Профиль Группа: Участник Сообщений: 184 Регистрация: 11.8.2005 Репутация: нет Всего: 8 |
Если я с утра правильно вижу ))
1. обрезает из-за паддингов, зачем они там вообще? 2. черным красит потому что неправильный размер канвы $canvasWidth а надо $width/2 P.S. зачем вот это вот все $canvasWidth=$width+4*$padding; ? из-за этого все лаги с обрезанием |
|||
|
||||
apostolnikolai |
|
|||
Бывалый Профиль Группа: Участник Сообщений: 152 Регистрация: 19.3.2009 Репутация: нет Всего: нет |
Если Вас не затруднит можете поправить код! я с php очень плоха дружу.
|
|||
|
||||
apostolnikolai |
|
||||||
Бывалый Профиль Группа: Участник Сообщений: 152 Регистрация: 19.3.2009 Репутация: нет Всего: нет |
С левой стороной разобрался
Добавлено через 1 минуту и 20 секунд А вот правую сторону как пока не выходит
Добавлено через 8 минут и 35 секунд Все разобрался! Вот рабочий код если кому надо :
ВСЕМ СПАСИБО !!!! |
||||||
|
|||||||
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | PHP: Графика | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |