aboutsummaryrefslogtreecommitdiff
path: root/imagecache_auto.inc
diff options
context:
space:
mode:
authorSilvio <silvio@devlet.com.br>2011-04-20 11:30:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-04-20 11:30:55 -0300
commitf853375cba68a214937b634e56affa067a5f0d62 (patch)
treec821742221550f0cf65020df11a19ac6e4725052 /imagecache_auto.inc
parentd79e3b775b544fe3656d566b4b3148a0b6a1d398 (diff)
downloadimagecache_auto-f853375cba68a214937b634e56affa067a5f0d62.tar.gz
imagecache_auto-f853375cba68a214937b634e56affa067a5f0d62.tar.bz2
Removing installation file
Diffstat (limited to 'imagecache_auto.inc')
-rw-r--r--imagecache_auto.inc140
1 files changed, 129 insertions, 11 deletions
diff --git a/imagecache_auto.inc b/imagecache_auto.inc
index e359d92..b7544b8 100644
--- a/imagecache_auto.inc
+++ b/imagecache_auto.inc
@@ -9,10 +9,10 @@
/**
* Create ImageCache profiles for common display resolutions.
*/
-function load_imagecache_presets_create() {
- $presets = module_invoke_all('load_imagecache_presets');
+function imagecache_auto_create_presets() {
+ $presets = imagecache_auto_presets();
foreach ($presets as $options) {
- load_imagecache_preset_create($options);
+ imagecache_auto_create_preset($options);
}
}
@@ -24,7 +24,7 @@ function load_imagecache_presets_create() {
*
* @see http://drupal.org/node/558664
*/
-function load_imagecache_preset_create($options) {
+function imagecache_auto_create_preset($options) {
// Set preset name
if (isset($options['name'])) {
$name = $options['name'];
@@ -65,7 +65,7 @@ function load_imagecache_preset_create($options) {
* @param $options
* Preset options.
*/
-function load_imagecache_preset_delete($options) {
+function imagecache_auto_delete_preset($options) {
// Set preset name.
if (isset($options['name'])) {
$name = $options['name'];
@@ -90,27 +90,29 @@ function load_imagecache_preset_delete($options) {
* @param $new
* New presets to be created.
*/
-function load_imagecache_presets_update($old = array(), $new = NULL) {
+function imagecache_auto_presets_update($old = array(), $new = NULL) {
// Remove old presets.
foreach ($old as $options) {
- load_imagecache_preset_delete($options);
+ imagecache_auto_delete_preset($options);
}
if ($new == NULL) {
- load_imagecache_presets_create();
+ imagecache_auto_create_presets();
}
else {
// Create new presets.
foreach ($new as $options) {
- load_imagecache_preset_create($options);
+ imagecache_auto_create_preset($options);
}
}
}
/**
* Return an array of common display resolutions.
+ *
+ * @see http://en.wikipedia.org/wiki/List_of_common_resolutions
*/
-function load_imagecache_presets_load_imagecache_presets() {
+function imagecache_auto_presets() {
return array(
array('width' => '90%', 'height' => '90%', 'operation' => 'imagecache_scale', 'name' => '0.90x0.90'),
array('width' => '80%', 'height' => '80%', 'operation' => 'imagecache_scale', 'name' => '0.80x0.80'),
@@ -130,6 +132,122 @@ function load_imagecache_presets_load_imagecache_presets() {
array('width' => '35%', 'height' => '35%', 'operation' => 'imagecache_scale', 'name' => '0.35x0.35'),
array('width' => '25%', 'height' => '25%', 'operation' => 'imagecache_scale', 'name' => '0.25x0.25'),
array('width' => '15%', 'height' => '15%', 'operation' => 'imagecache_scale', 'name' => '0.15x0.15'),
- array('width' => '5%', 'height' => '5%', 'operation' => 'imagecache_scale', 'name' => '0.05x0.05'),
+ array('width' => '5%', 'height' => '5%', 'operation' => 'imagecache_scale', 'name' => '0.05x0.05'),
+ array('width' => 120, 'height' => 160),
+ array('width' => 140, 'height' => 192),
+ array('width' => 160, 'height' => 120),
+ array('width' => 160, 'height' => 144),
+ array('width' => 160, 'height' => 160),
+ array('width' => 160, 'height' => 200),
+ array('width' => 160, 'height' => 240),
+ array('width' => 160, 'height' => 256),
+ array('width' => 176, 'height' => 208),
+ array('width' => 176, 'height' => 220),
+ array('width' => 208, 'height' => 208),
+ array('width' => 208, 'height' => 320),
+ array('width' => 240, 'height' => 160),
+ array('width' => 240, 'height' => 320),
+ array('width' => 240, 'height' => 376),
+ array('width' => 240, 'height' => 640),
+ array('width' => 256, 'height' => 192),
+ array('width' => 256, 'height' => 256),
+ array('width' => 280, 'height' => 192),
+ array('width' => 320, 'height' => 192),
+ array('width' => 320, 'height' => 200),
+ array('width' => 320, 'height' => 240),
+ array('width' => 320, 'height' => 256),
+ array('width' => 320, 'height' => 320),
+ array('width' => 320, 'height' => 480),
+ array('width' => 352, 'height' => 416),
+ array('width' => 400, 'height' => 240),
+ array('width' => 400, 'height' => 300),
+ array('width' => 432, 'height' => 240),
+ array('width' => 480, 'height' => 250),
+ array('width' => 480, 'height' => 272),
+ array('width' => 480, 'height' => 320),
+ array('width' => 480, 'height' => 500),
+ array('width' => 512, 'height' => 256),
+ array('width' => 512, 'height' => 342),
+ array('width' => 512, 'height' => 384),
+ array('width' => 560, 'height' => 192),
+ array('width' => 600, 'height' => 480),
+ array('width' => 640, 'height' => 200),
+ array('width' => 640, 'height' => 240),
+ array('width' => 640, 'height' => 256),
+ array('width' => 640, 'height' => 320),
+ array('width' => 640, 'height' => 350),
+ array('width' => 640, 'height' => 360),
+ array('width' => 640, 'height' => 400),
+ array('width' => 640, 'height' => 480),
+ array('width' => 640, 'height' => 512),
+ array('width' => 720, 'height' => 348),
+ array('width' => 720, 'height' => 350),
+ array('width' => 720, 'height' => 364),
+ array('width' => 720, 'height' => 480),
+ array('width' => 768, 'height' => 480),
+ array('width' => 800, 'height' => 352),
+ array('width' => 800, 'height' => 480),
+ array('width' => 800, 'height' => 600),
+ array('width' => 832, 'height' => 624),
+ array('width' => 854, 'height' => 480),
+ array('width' => 960, 'height' => 540),
+ array('width' => 960, 'height' => 640),
+ array('width' => 960, 'height' => 720),
+ array('width' => 1024, 'height' => 576),
+ array('width' => 1024, 'height' => 600),
+ array('width' => 1024, 'height' => 640),
+ array('width' => 1024, 'height' => 768),
+ array('width' => 1024, 'height' => 800),
+ array('width' => 1024, 'height' => 1024),
+ array('width' => 1120, 'height' => 832),
+ array('width' => 1152, 'height' => 720),
+ array('width' => 1152, 'height' => 768),
+ array('width' => 1152, 'height' => 864),
+ array('width' => 1152, 'height' => 900),
+ array('width' => 1280, 'height' => 720),
+ array('width' => 1280, 'height' => 768),
+ array('width' => 1280, 'height' => 800),
+ array('width' => 1280, 'height' => 854),
+ array('width' => 1280, 'height' => 960),
+ array('width' => 1280, 'height' => 1024),
+ array('width' => 1366, 'height' => 768),
+ array('width' => 1400, 'height' => 1050),
+ array('width' => 1440, 'height' => 900),
+ array('width' => 1440, 'height' => 960),
+ array('width' => 1440, 'height' => 1024),
+ array('width' => 1440, 'height' => 1080),
+ array('width' => 1600, 'height' => 768),
+ array('width' => 1600, 'height' => 900),
+ array('width' => 1600, 'height' => 1000),
+ array('width' => 1600, 'height' => 1024),
+ array('width' => 1600, 'height' => 1200),
+ array('width' => 1680, 'height' => 1050),
+ array('width' => 1792, 'height' => 1344),
+ array('width' => 1800, 'height' => 1440),
+ array('width' => 1856, 'height' => 1392),
+ array('width' => 1920, 'height' => 1080),
+ array('width' => 1920, 'height' => 1200),
+ array('width' => 1920, 'height' => 1400),
+ array('width' => 1920, 'height' => 1440),
+ array('width' => 2048, 'height' => 1152),
+ array('width' => 2048, 'height' => 1536),
+ array('width' => 2304, 'height' => 1440),
+ array('width' => 2560, 'height' => 1440),
+ array('width' => 2560, 'height' => 1600),
+ array('width' => 2560, 'height' => 1920),
+ array('width' => 2560, 'height' => 2048),
+ array('width' => 2800, 'height' => 2100),
+ array('width' => 3200, 'height' => 2048),
+ array('width' => 3200, 'height' => 2400),
+ array('width' => 3840, 'height' => 2160),
+ array('width' => 3840, 'height' => 2400),
+ array('width' => 4096, 'height' => 2304),
+ array('width' => 4096, 'height' => 3072),
+ array('width' => 5120, 'height' => 3200),
+ array('width' => 5120, 'height' => 4096),
+ array('width' => 6400, 'height' => 4096),
+ array('width' => 6400, 'height' => 4800),
+ array('width' => 7680, 'height' => 4320),
+ array('width' => 7680, 'height' => 4800),
);
}