In JavaScript nor in Object Pascal , the maximum string size should be a limit to any normal picture. Strings can for sure be larger than 21800 chars in both JavaScript or Object Pacal. I can only guess your DB field size is the limit.
I store pictures in DB in a Blob memo field... but in my entity i MUST use a string field declaration to pass the picture to a webapp due errors discussed before ...