Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

GIFs????


orlin

Recommended Posts

Hello you all...

 

This contribution is awesome, but my client has over 2000 products with images in GIF format.

 

Is it possible somehow to implement GIF image support in addition to the JPEG and PNG???

 

Thanks,

 

Orlin.

Link to comment
Share on other sites

This contribution is awesome, but my client has over 2000 products with images in GIF format.

What tha??

Which contribution? My crystal ball is out of service...

 

Is it possible somehow to implement GIF image support in addition to the JPEG and PNG???

If you're talking about the contribution which automatically creates thumbnails from the larger images, you'll have to wait until PHP is updated. The patent on the GIF format has only just expired (20-06-2003) so we'll probably see a mixed reaction to it's uptake.

NOTE: Patents are still in force until 2004 in Canada, France, Italy, Germany, United Kingdom and Japan.

 

Some people will be 'anti' GIF because UNISYS (patent owners) wanted users to pay a licensing fee to use the LZW (Lempel Ziv Welch) compression in their software, which is the compression technique in standard GIF files. PNG is being supported by more and more browsers... (post 1997, only about 1% of internet users left that don't support PNG) so both PNG and JPG look like being the way ahead.

 

The PNG format offers transparency and in most cases a reduction in file size compaired to GIF.

 

If you're still not convinced about dropping the GIF format, read this UNISYS page:

http://www.unisys.com/about__unisys/lzw/lz...se__english.htm

According to this site, if you use licenced software to create your GIF's than you're also licenced to use those images on your website, though you could be up for a big surprise if the software you used isn't licenced to use LZW compression.

A BS money making game from UNISYS in my opinion!

 

HTH,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Link to comment
Share on other sites

Sorry, I guess I've hit the "new topic" button instead of "reply" when I was browsing another thread.

 

Anyway...I'll be more careful next time.

 

The contribution in question is the "Catalog products PDF reports" (http://www.oscommerce.com/community/contributions,908).

 

As for the GIF, I use legal copy of Adobe Photoshop 7.0, but I don't think that using free programs like Irfan View for example would violate any compression algorithms copyrights and bull... Please, correct me if I'm wrong, I'd appreciate it.

 

Orlin

Link to comment
Share on other sites

Orlin

I think the issue is more about PHP choosing to work with gif's in the pdf conversion, not with your right to create them. I am trying to get this contrib to work with images as well. I used gif2png to convert all the files to png. You can find it in a google search. After that you'll have to do a strreplace to get the file path to point to *.png instead of *.gif. Ian had a post regarding this.

http://www.oscommerce.com/forums/viewtopic.php...1&highlight=pdf

Link to comment
Share on other sites

Thank you Sirkyle.... I visited those posts, and they are really useful and I will definitely use the info there.

 

In the meantime, I've set up an MS1 test shop, and I tried to install this contribution. I made sure that all of the products' images are JPG format, as well as the images for the categories, the manufacturers and etc. Then I got this script-error (not specifiying what exactly) when I try to create the PDF from the admin.

 

So, I started commenting out lines in the code, and going deeper and deeper into the code, I reached a point where I commented just one line that calls a very simple (but working---I verified it!!!) function, and then the PDF is created, but with no images. Maybe if you've got time, you can look into the "fpdf.php" around line 1254 where it says

$this->_putstream($info['data']);

Commenting that out enables the shop to create the PDF, but with no pictures. I think that this is actually the pixel information for the images themselves, and then, where do you think is the problem? Maybe the $info['data'] is not made properly??? Or it's too long (big in size) and for some reason the _out function cannot write it to the file?

 

Any opinions from anybody will be appreciated!!!!!

 

Thank you,

 

Orlin.

Link to comment
Share on other sites

Orlin, what was the error you were getting before you comment out the line? Have you tried to modify your pdf_config.php file to turn images off? I was having a problem with images myself. My problem turned out to be that if I had a broken image, the PDF would not create and it would give me a no such file or file type exists error. I would try uncommenting everything and then see what error you get. Also, I had a problem with the default image path that the file was loading. It would probably be more helpful to see the error. Cutting off the img placement line only shows us that it may be a graphic problem.

Link to comment
Share on other sites

Hi again, Sirkyle.

 

I located the problem, but don't know why it occurs. Commenting out around line 1451 the

	$data=fread($f,filesize($file));

eliminates the error, but still no images, and of course---I comment out the reading of the image file. Wonder why it can't read them...maybe the paths are not good as you say....

 

As for the error, it is not an error of the script itself, but server error, so I should have thought since the beginning, that there is some I/O problem. But if you still want to see the exact words, they are:

error 500: Interner Serverfehler

 

 

Das angegebene Skript konnte nicht fehlerfrei ausgef?hrt werden!

This is in German, because my hosting server is German. Me myself don't speak/understand german, but still---it clearly says that there is some error in the Skript, which is confusing.

 

Anyway, I'll be going for now (it's 5pm here), and I'll be back online tomorrow morning (Germany time), when I'll try to look again into the problem, and I'll post here anything I find.

 

Have a good day :)

 

Orlin.

Link to comment
Share on other sites

Orlin

First let me start by saying that I'm still trying to wrap my head around this mod, I don't totally understand it. I know I've read posts about server timeouts. Perhaps there is a problem with the actual file size. If you?re using 2000 products with graphics, that may run some limit. You might try using the option to resize the img files in the config. I know you need to reset an option in your php.ini for the size variable with this. That is covered in another post. search for *PDF* in contributions to find it. There is another possiblity. The error you are getting points to the jpg file option. Are you using jpg files or did you run the gif2png and are using png files. Either way, make sure all your file paths are valid. If you pull an img from somewhere else, make sure it?s a valid jpg and not a gif renamed. Your mod seems to fall correctly through the point where it looks for img files, verifies that they have a jpg or png extension. That is where mine was erroring out. So it seems that all your file extensions are valid, but perhaps there is either a corrupt image or server issue.

Personally I like bablefish for my german to english translation: http://world.altavista.com/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...