Benvinguts a la nova era de la televisió:
Social Media Revolution 2 (Refresh)
Web site inspiration - Inspiración para creación de paginas web
- http://www.webdesign-inspiration.com/
- http://theodin.co.uk/(Cut line)
- http://www.smashingmagazine.com/tag/showcases/(Showcases)
- http://www.flickr.com/photos/splat/sets/981332/
- http://abduzeedo.com/
- http://www.asiteaday.org/
- http://box.mepholio.com/
- http://thedesigninspiration.com/(Logos, websites, illustration, fonts, patterns)
- http://www.deviantart.com/#order=9&q=web+site
- http://blog.insicdesigns.com/ (Webs)
- http://blog.insicdesigns.com/ (Logos)
- http://www.webdesignerdepot.com/(Watercolor)
- http://www.youthedesigner.com/ (Portafolios)
- http://net.tutsplus.com/ (Green color)
- http://www.1stwebdesigner.com/ (Green color)
- http://webdesignledger.com/ (Black & white)
- http://net.tutsplus.com/ (Red)
- http://designinstruct.com/(Bright & sleek)
Watermark & Image Component for CakePHP
Note: This Component has been recently updated and you can find the changes here: /2011/04/clase-php-para-tratar-imagenes-rotar-redimensionar-anadir-marcas-de-agua/
Time ago I created a CakePHP component for applying watermarks to images. Slowly I extended it and now in addition to applying watermarks is used to rotate and resize images.
You can still improve it a lot, especially in terms of code, but as it works and I have little time, I can barely make improvements.
Tested from:
- Linux php 5.2.10
- Linux php 5.2.13
- Windows php 5.3.1
- Windows php 5.3.2
Well Known Bugs:
Uses the method mime_content_type that as they say in php.net: This function has been deprecated as the PECL extension Fileinfo provides the same functionality (and more) in a much cleaner way.**[ SOLVED ]**- By rotating a transparent PNG image at an angle that is not a multiple of 90º the extra generated background is not transparent.
Download:
http://github.com/elboletaire/Watimage/archives/master
Usage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <?php // /app/controllers/foo_controller.php class FooController extends AppController { var $name = 'Foo'; // Remember to initialize the component var $components = array('Watermark'); public function upload() { // ... upload stuff if ($is_uploaded) { $this->Watermark->setImage($image_path); $this->Watermark->resize(array('type' => 'resizecrop', 'size' => array(450, 450))); $this->Watermark->generate($dest_path); // ... more stuff ... } } } |
Original files used for demonstrations:
Resize:
1 2 3 | $this->Watermark->setImage($image_path); $this->Watermark->resize(array('type' => 'resizecrop'), 'size' => array('300', '200')); $this->Watermark->generate($dest_path); |
Resize types:
- **resize**: Maintains the aspect ratio of the image and makes sure that it fits within the max width and max height (thus some side will be smaller).
- **resizemin**: Maintains aspect ratio but resizes the image so that once one side meets its max width or max height condition, it stays at that size (thus one side will be larger).
- **resizecrop**: Resize to max, then crop to center.
- **crop**: A straight centered crop.
* Resizing criteria extracted from iamkoa labs image upload component
Rotate:
1 2 3 | $this->Watermark->setImage($image_path); $this->Watermark->rotateImage(array('degrees' => 45)); $this->Watermark->generate($dest_path); |
Apply watermark:
1 2 3 4 | $this->Watermark->setImage($image_path); $this->Watermark->setWatermark(array('file' => $watermark_file, 'position' => 'bottom right', 'size' => '150%')); $this->Watermark->applyWatermark(); $this->Watermark->generate($dest_path); |
All together:
1 2 3 4 5 6 | $this->Watermark->setImage($image_path); $this->Watermark->setWatermark(array('file' => 'watermark.png', 'position' => 'bottom right', 'size' => '150%')); $this->Watermark->resize(array('type' => 'resizecrop', 'size' => array('300', '200'))); $this->Watermark->applyWatermark(); $this->Watermark->rotateImage(array('degrees' => 45, 'bgcolor' => 0)); $this->Watermark->generate($dest_path); |
Changing order:
1 2 3 4 5 6 | $this->Watermark->setImage($image_path); $this->Watermark->setWatermark(array('file' => 'watermark.png', 'position' => 'bottom right', 'size' => '150%')); $this->Watermark->rotateImage(array('degrees' => 45, 'bgcolor' => 0)); $this->Watermark->resize(array('type' => 'resizecrop', 'size' => array('300', '200'))); $this->Watermark->applyWatermark(); $this->Watermark->generate($dest_path); |
Show image instead of saving it:
1 2 | $this->Watermark->setImage($image_path); $this->Watermark->generate(); // Without params |
With errors:
1 2 3 4 5 6 7 8 9 10 11 12 13 | // every component method return false on error if (!$this->Watermark->setImage($image_path)) { // whatever print_r($this->Watermark->errors); } if (!$this->Watermark->resize(array('type' => 'resizecrop', 'size' => 250))) { // ... } if (!$this->Watermark->generate()) { // ... } |
Gigya: Todas las redes sociales optimizadas para el desarrollo
¿Cuántas veces has tenido que integrar una de tus aplicaciones web con Facebook? Y después de Facebook, tuviste que hacer la integración con Twitter, la de LinkedIn y otras tantas más.
Con Gigya tienes una API unificada para la mayor parte de las redes sociales. En apenas media hora habrás integrado el login de tu página con Facebook, Twitter, LinkedIn, OpenID, Yahoo, MySpace o cualquier otra de las redes sociales que puedes integrar con Gigya.
Para utilizarlo simplemente necesitas registrarte en su web y añadir aquellos servicios que quieras utilizar desde el panel de control:
Además de la integración que podáis hacer vosotros mismos junto con la documentación de Gigya podéis encontrar plugins e integraciones ya hechas para CMS como Wordpress o Joomla.
[cb type=”company”]Gigya[/cb]
- Web oficial e Gigya: http://www.gigya.com
- Plugin e integración de Gigya con Wordpress: http://wiki.gigya.com/050_Socialize_Plugins/010_Wordpress_Plugin