Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

file Image files extensions in UPPERCASE

More
12 years 2 months ago #922 by alex6m
Replied by alex6m on topic Re: Image files extensions in UPPERCASE
Hello again,

While further looking for an answer I started to follow step-by-step the thumbnail creation process. Finally I came up with this and it seems ok:



(If it does not display please check here .)

The code for obtainig this thumbnail is:
<?php 
 $file = $_GET['pfile'];
 $size = $_GET['size']; 
 header('Content-type: image/jpeg'); 
 list($width, $height) = getimagesize($file); 
 $modwidth = $width * $size; 
 $modheight = $height * $size; 
 $tn= imagecreatetruecolor($modwidth, $modheight); 
 $source = imagecreatefrompng($file); 
 imagecopyresampled($tn, $source, 0, 0, 0, 0, $modwidth, $modheight, $width, $height); 
 imagejpeg($tn, null, 100); 
?> 

So, the GD seems to work, and I tested with the images that have problems in LatestNewsEnhanced.

Please let me know if we are crossing the boundary of free support; I want to be fair and pay for your time if you can/want to help me with this.

Best regards,
Alex.

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #924 by admin
Replied by admin on topic Re: Image files extensions in UPPERCASE
Thank you for the follow up.
I don't really know how I can help you.
I am going to do some testing with your image on my test site and see how it goes. Hopefully it will fail.

Olivier.

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #927 by admin
Replied by admin on topic Re: Image files extensions in UPPERCASE
I have added the image to one of my site's articles. It does work. I am on PHP v5.3.4 though.
Ok, kind of stupid but: if the problem is just with that image, could you open it in an image viewer (like XnView) and save it as a .png and see if that works after that?

Olivier.

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #928 by alex6m
Replied by alex6m on topic Re: Image files extensions in UPPERCASE
I've done this at the begining, right with XNView,

Now I'm getting close to problem: it's with the path.

I've added "echo $image."<br>";" on the line 28 of your "image.php" file and looked at the results, please see the attached file. The file with the "slash" in front of path is not working; all the rest are ok (they are the thumbnails in the attached image)


Then I looked at the HTML source of article where the source images are embedded, searching for errors.
The working one, without slash, is
<img src="/images/abonamente-service-calculatoare.png" border="0" alt="Abonamente service calculatoare Bucuresti" title="Abonamente service calculatoare Bucuresti">

The NOT working one, WITH slash is
<img title="Service calculatoare Bucuresti" src="/images/hosting-gazduire.png" alt="Service calculatoare Bucuresti" border="0">

So nothing relevant here, at least not for me.

But I came up with a workaround: I added the bold code below on the line 20 in your "image.php" file:

$this->imgSrc = "/home/ultrantworks/public_html/".$image;

Now the path is absolute and all thumbnails gets created and displayed corectly!!

This is ok for me now, I'll keep this under observation and if everything keeps going I'll integrate the module on the homepage, where it belongs.

I hope these informations are usefull to you, and if you think I should do other changes please let me know.

Best regards,
Alex.
Attachments:

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #929 by admin
Replied by admin on topic Re: Image files extensions in UPPERCASE
Wow, this is rather strange.
I will look at the code and see if I can force the path in some way so it is not 'extrapolated' by the system.
Thank you for keeping me in the loop, it will definitely help improving the module by seeing scenarios like this, where everything should work but does not... The funny thing is, it did that behavior only on the 1st image... I am not sure if this is relevant... Was wondering if by switching the order of the articles you would have the same problem for the 1st article but not the next ones...

Olivier.

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #930 by alex6m
Replied by alex6m on topic Re: Image files extensions in UPPERCASE
Ah, you made me curious!

So, I modified "image.php" as in the message below, then I went in the module options and switched article ordering to "Random" (which is an awsome option I didn't noticed before!).

Then I checked the page where the module is displayed .

And the results: in this section (which only have 6 articles) there are only 2 images that does not work, wherever in the list they may apear. You can spot them if you go to that link and refresh it a couple of times. However these images are corectly displayed in their articles, which you can check by following the links of the non-working thumbnails.

Please let me know when you are done with this test so I can change back the "image.php" file.

I hope this help you better understand the behavior. If there is anything else I can do please let me know!

Best regards,
Alex.

Please Log in or Create an account to join the conversation.