[drupal-devel] Image.inc and separation of gd2
Greetings, I've been looking into the image.inc code and I'm unhappy with the amount of gd2-specific code in that file. The logic in many of the functions has special cases for gd2 that would be unnecessary if gd2 were another external toolkit, rather than integrated with image.inc. Couldn't we distribute Drupal with image.inc and image.gd2.inc? I think that would make all the image code simpler, more readable, and more maintainable. -- Tim Altman
Op 25-mrt-05 om 12:15 heeft Tim Altman het volgende geschreven:
I've been looking into the image.inc code and I'm unhappy with the amount of gd2-specific code in that file. The logic in many of the functions has special cases for gd2 that would be unnecessary if gd2 were another external toolkit, rather than integrated with image.inc. Couldn't we distribute Drupal with image.inc and image.gd2.inc? I think that would make all the image code simpler, more readable, and more maintainable. Tim,
I'm not sure what you mean.. We already ship drupal with a image.inc, which standard uses GD 2. If you want the image_gd2_*() functions to be extracted from the standard image.inc, I have to disappoint you.. That's not gonna happen.. But, if you want to use other toolkits than GD 2, you are free to use any of these: ImageMagick: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/image/ image.imagemagick.inc IMagick: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/gordon/ image.imagick.inc IMLib: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/gordon/ image.imlib.inc GD 1: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/stefan/ image.gd1.inc If I understood you wrong, please send an e-mail again or contact me in private.. Stefan.
Stefan Nagtegaal said:
Op 25-mrt-05 om 12:15 heeft Tim Altman het volgende geschreven:
I've been looking into the image.inc code and I'm unhappy with the amount of gd2-specific code in that file. The logic in many of the functions has special cases for gd2 that would be unnecessary if gd2 were another external toolkit, rather than integrated with image.inc. Couldn't we distribute Drupal with image.inc and image.gd2.inc? I think that would make all the image code simpler, more readable, and more maintainable.
[...]
If you want the image_gd2_*() functions to be extracted from the standard image.inc, I have to disappoint you.. That's not gonna happen..
Yes, that's exactly what I mean. Why won't it happen? As I said in my original message, image.inc is messy right now because it's trying to handle both the the logic for gd2 and for all other toolkits. If gd2 were just treated like another toolkit (though the only one included by default), then the image.inc code would be much cleaner and more easily maintained. -- Tim Altman
Op 25-mrt-05 om 12:53 heeft Tim Altman het volgende geschreven:
If you want the image_gd2_*() functions to be extracted from the standard image.inc, I have to disappoint you.. That's not gonna happen..
Yes, that's exactly what I mean. Why won't it happen? As I said in my original message, image.inc is messy right now because it's trying to handle both the the logic for gd2 and for all other toolkits. If gd2 were just treated like another toolkit (though the only one included by default), then the image.inc code would be much cleaner and more easily maintained. First of all, I agree with you..
I tried to make that seperation of api and gd2 code happen before, but unfortunatly most people are against it.. Maybe Walkah can give you more information on this?? Stefan.
Stefan Nagtegaal said:
Op 25-mrt-05 om 12:53 heeft Tim Altman het volgende geschreven:
If you want the image_gd2_*() functions to be extracted from the standard image.inc, I have to disappoint you.. That's not gonna happen..
Yes, that's exactly what I mean. Why won't it happen? As I said in my original message, image.inc is messy right now because it's trying to handle both the the logic for gd2 and for all other toolkits. If gd2 were just treated like another toolkit (though the only one included by default), then the image.inc code would be much cleaner and more easily maintained. First of all, I agree with you..
I tried to make that seperation of api and gd2 code happen before, but unfortunatly most people are against it.. Maybe Walkah can give you more information on this??
I've gone ahead and done all the changes. See http://drupal.org/node/19611. -- Tim Altman
participants (2)
-
Stefan Nagtegaal -
Tim Altman