Jump to content

picture .gif for product ?


Recommended Posts

  • 5 months later...

Dear all,

I am encountering a similar issue. I am attempting to include animated GIFs in my product import but these are converted to JPG format without animation on import.

I just wanted to follow up on this thread and see if jemoworld had resolved this? L. Brett Sinclair, can I ask how you mean the 'scene feature'? Are you referring to the Preferences >> Images config area in the CMS? I don't see how this would help, am I missing something?

I am currently using v1.2.0.5.

Thanks in advance for your help.

Best,
Meg

Link to comment
Share on other sites

and saw this in another post

AS for the Animated or transparent gif ‘s … I duplicated the ‘‘blockadvertising’‘ module renaming ‘‘blockpuba’‘ and ‘‘blockpub’‘ hard coded the call to its image bloc into ‘’.gif’‘ instead of ‘’.jpg’‘ when presta finds the new module he installs it and you find the same tools as with the ‘‘blockadvertising’‘.. (In my case i took out the ‘’’‘ … and again its works just fine .. animated or transparent …..

Link to comment
Share on other sites

Thanks as ever, Snol, for your prompt reply. Unhappily, I don't think that these resources apply to my problem. I didn't realise that 'scenes' referred to the image mapping functionality, which is all good. I too saw the post re. hard coding in a module, but don't think that applies to my case either. The root of my issue is that GIFs (animated or otherwise) are converted to JPG if they are included in a product import. I've seen on the forum that GIF is not supported in import (as of Nov 2008, so perhaps there's been work since then) and I've had a little look in images.inc.php. I am hesitant to alter the base product too much as this will inevitably introduce bugs, make upgrade difficult and essentially undermine a lot of the benefits of an Open Source solution. I'm working on this again this morning and will have a more thorough look at the images.inc.php and the product TPLs. I was hoping there was a plugin the would allow the system to handle GIFs on import. Perhaps that's down to me. Haha ;)

Best,
Meg

Link to comment
Share on other sites

Hi all,

I've investigated the code and I believe I understand what is causing GIF to be returned as JPG on import. The productImport() function invoked in AdminImport.php calls copyImg(), copyImg() calls imageResize() which is imported from images.inc.php. imageResize() takes a $fileType argument which is set to '.jpg', imageResize() passes the $fileType to the returnDestImage() function which then returns an image of the $fileType. I've had a quick look at the code in the latest version (1.2.0.8) and it appears to be the same as in my install (1.2.0.5). I am very concerned about altering this code as it is significant alteration to the code base and a quick scan of related code shows the string '.jpg' is liberally sprinkled, so there will be a lot of bugs introduced by any work I do on this, and, as I mentioned in my previous post, this level of customisation is problematic and erodes some of the advantages of an Open Source solution. I wonder if support for GIF import is a PS development priority?

Best,
Meg

Link to comment
Share on other sites

Thanks very much for your reply. Indeed, I have tried that. This does not solve the problem. Two things that I can see off the bat. Firstly, the product page is still searching for a JPG (this probably relates to those '.jpg' strings I've seen in the code, but I've not properly looked into this). Secondly, while the image has been renamed, it is still *really* a JPG, so Chrome and FF will render an unanimated JPG albeit with an incorrect file extension, but the less forgiving IE displays nothing as the file extension is not true to the *actual* file type (I believe). My guess is, and I haven't gone this deep, is that when the files are processed through the GD lib they are irrevocably altered to JPG so jiggery pokery with a script to rename the appropriate JPGs to GIF wouldn't work, quite aside from how nonextensible/maintainable that approach may prove over time. Besides, it remains that the view is expecting JPGs so any work around would need to alter that expectation as well. This is a show stopper for my clients and I can certainly programme a solution, but as I've mentioned this moves away from an Open Source towards a bespoke solution, even incrementally, which I'd rather avoid.

Meg

Link to comment
Share on other sites

×
×
  • Create New...