Jump to content

Search the Community

Showing results for tags 'imageResize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Addons
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 2 results

  1. Hi all, I'm just starting using Prestashop, and for each product in my site I would like to show a gallery of pictures. I see that Prestashop use fancybox as default, and it's ok for me... but every picture shown was square with empty white space. I didn't like it.. I wanted to see my rectangular pictures (with that cool effect of resizing when you're browsing throw the gallery). After some search I found out that I can decide the size of the picture in Preferences->Image tab, where you can decide the size of some picture categories: small, medium, large, thickbox, category, home, large_scene, thumb_scene. I just set width and height to 0 for thickbox category, and then I rebuilt the thumbnails, and after this my gallery was shown as I wanted... with my rectangular pictures. But after thet, if I tried to add a new picture to a product i received an error: An error occurred while copying image: thickbox. Of course some functions didn't like new size 0x0. And if I tried to see the gallery, I just received an error while I was showing picture I just uploaded. But after Preferences->Image->rebuilt the thumbnails.. everything worked again. So there is something wrong during upload... I just had a look into the code and found that in /prestashop/admin/tabs/AdminProducts.php, function copyImage call function imageResize and after that the error is displayed. Function imageResize is in /prestashop/images.inc.php... I just changed rows if ($destWidth == NULL) $destWidth = $sourceWidth; if ($destHeight == NULL) $destHeight = $sourceHeight; in if ($destWidth == NULL || $destWidth == 0) $destWidth = $sourceWidth; if ($destHeight == NULL || $destHeight == 0) $destHeight = $sourceHeight; [is this a bug?] and after this also upload pictures worked with no errors... but with a side effect: -if I upload a picture too big, it's not resized to fit the screen. I just looked in /prestashop/js/jquery/jquery.fancybox-1.3.4.js and I saw that default values was: [snip] autoScale : false, autoDimensions : false, [snip] [is this a bug?] But I didn't want to change these settings because these changes will affect the whole site and i don't know if there be some problem (I think not.. anyway). I just search the javascript file where fancybox is initialized, and it's: /prestashop/themes/prestashop/js/product.js I'm using default theme with prestashop 1.4, and this is the only file where fancybox is initialized, and it's only for products... so it's ok for me to change it from: $('.thickbox').fancybox({ 'hideOnContentClick': true, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); to $('.thickbox').fancybox({ 'autoScale': true, 'autoDimensions': true, 'hideOnContentClick': true, 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); And after these changes, even if uploaded image is too big, it's resized to fit the screen. This is all I done to make the fancybox gallery work the way I like it... I wrote everything just because I'm new of prestashop, and I don't know if what I did is the right way to work.. and if what I found is to be considered a bug or not. Hope this can help someone, bye, tan ps. sorry for my english :-P
  2. Hello, I've modified the imageResize() function in "images.inc.php" file, so the images are "cut to fit" (I hate the white bands around the images), and also add some PHP GD extra options (desaturate image, apply a watermark through a PNG file, etc.). This "beta" version does these tasks by looking for some parameters in a PHP file included manually in the theme, but this means to change the Prestashop structure (at least the images.inc.php file). I think that the "elegant way" is to make a module in which you can set these tasks for each image type. Here is my question: is there an "official way" to override "images.inc.php". I know that you can override classes, controllers, etc. using the "override" folder. Can I do the same with the "images.inc.php"? Regards.
  • Create New...