[TASK] Refactoring of picture processing

Change-Id: I5641f96de44d7f6969ab2c55abb0fd35c5452be2
Reviewed-on: https://review.typo3.org/25250
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers