Some comments:
- first of all — why you are need it? May be there are another way to do it.
- nevertheless this can be done with PHP standard GD library, that already used in CMS (see http://ru2.php.net/manual/en/book.image.php for docs).
- the main question: is there any usefull hooks (in PAgeAvatar for example) to catch some image related code to insert own for image manipulation.
https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F