Announcement: New plug-in SuperSizer

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

Hi,

Thank you Jeremy for input and a new version.. can't believe what happened here over night  ;)

So, no I'm in the process of testing.. downloaded new version and put in a plugins folder.

First, I tried your path solution
{assign var=Location value=$entry->file_location|replace:"http://localhost/cms-1.6.6":""}
but this produces more errors on details page (maybe we have a typo here don't know):

Warning: getimagesize(/uploads/cgblog/id22/IMG_5094.JPG) [function.getimagesize]: failed to open stream: No such file or directory in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 114

Warning: Division by zero in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 365

Warning: imagesx(): supplied argument is not a valid Image resource in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 166

Warning: imagesy(): supplied argument is not a valid Image resource in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 167

Warning: imagecopyresized(): supplied argument is not a valid Image resource in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 317

Warning: filemtime() [function.filemtime]: stat failed for /uploads/cgblog/id22/IMG_5094.JPG in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 479


So, when I get back to the first code
{assign var=Location value=$entry->file_location}

I get exactly the same error as before.. dealing with 'filemtime' now at line 479. With commenting these two lines no errors at all.

Also, now I have to deal with Apache crashes. So, when I test the Summary page in browser, Apache crashes all the time so I have to restart it etc. EDIT: I think I solved this by moving from FF to Chrome - no crashes right now, we'll see.

The smooth - I try to set it up but as with the Quality parameter, thumbnails look the same for different values. Please take a look at the attached images. The result looks the same, too blurry for my taste  :)

I have reviewed again the link you sent, and I see that your thumbs look great - as from the PS. Maybe this could be related to my system setup, GD or something else?

You mentioned several parameters in your last post, but I don't know the exact syntax for using these in Supersizer, can you clarify this?

Cheers
Darko
Attachments
Smooth-1.jpg
Smooth-1.jpg (8.69 KiB) Viewed 4124 times
Smooth-0.5.jpg
Smooth-0.5.jpg (8.74 KiB) Viewed 4125 times
Smooth-0.1.jpg
Smooth-0.1.jpg (8.77 KiB) Viewed 4128 times
Last edited by darconny on Thu Nov 26, 2009 1:09 pm, edited 1 time in total.
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am

Re: Announcement: New plug-in SuperSizer

Post by fredp »

darconny wrote: ...
First, I tried your path solution
{assign var=Location value=$entry->file_location|replace:"http://localhost/cms-1.6.6":""}
but this produces more errors on details page...
Hey Darko,

I haven't tried this mod at all and it probably won't work for some sites, but it might be worth a try:

Code: Select all

{assign var=Location value=$entry->file_location|replace:$config['uploads_url']:$config['uploads_path']} 
Regards,
Fred
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

Hey Fred,

Thanks.. but unfortunately your mod doesn't work on my localhost.. whole page breaks apart.

Regards
Darko
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

darconny ok..

try this one out.... keep in mind the I have not added the rooturl scrub out so make sure the path is /uploads/.. etc.

just remove the .txt .  Also this does work on the live test sandbox I've been using for the examples, and on my wamp localhost server.

On the too blurry... gezz to sharp, now to blurry what do you want :D j/p I know that was going to be said and which is why I'm working on filters... there not in working yet so Smooth is all there is ATM... but to address the question
You mentioned several parameters in your last post, but I don't know the exact syntax for using these in Supersizer, can you clarify this?
What will be is that you'll do something like this

{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id  filter=IMG_FILTER_PIXELATE farg1=100 farg2=2 }

so it'd turn the image into 100x100 block image... so you will be able to change the colors, the contrast, brightness etc.... but that is not done yet... try the version here... it should fix it, otherwise I need to know all the details... system info and what not...


Cheers
Jeremy
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

Thanks.. now it's working without throwing me an error on filemtime! :)

Also, I had some troubles with Apache (localhost), after restarting and moving to Chrome it's better now. Finally I get my hands on the Quality parameter, and it works very well. So when I change the value I get images of different quality and size.. nice.

Now I'm trying out filters, but when I put the filter as you said I get an error:
Warning: Wrong parameter count for imagefilter() in C:\xampp\htdocs\cms-1.6.6\plugins\function.supersizer.php on line 210

My Summary Template on CGBlog looks like this at the moment:

{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
   
        {if $field->type == 'file'}
          {if $field->name == 'image1'}
            {assign var=Photo value=$field->value}
            {assign var=Location value=$entry->file_location}
            {assign var=Item value=$entry->id}
            detail_url alt="{$entry->title}">
                {supersizer path="$Location/$Photo" height='90' Quality=100 Subdir="$Item" filter=IMG_FILTER_PIXELATE farg1=100 farg2=2}
           
          {/if}
      {else}
          {$field->name}: {eval var=$field->value}
      {/if}
   
  {/foreach}
{/if}

I've added Subdir parameter, so every Blog article has its own Supersizer folder, works good as I can see.
Thumbs are ok, I hope I'll get my hands on the filters too.. so hopefully can fix that too.

For the 100x100 output block image, I suppose that the source image was square  :)

So, only filters not working at the moment, Smooth also not working.. but no big deal.. the sharp is better than too blurry :D

Thank you very much
Darko
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

no no.. the filter are not completed yet  ;D  I was just give a heads up that they are coming... glad that change woked... I'll get it tested and publish it....

Cheers
Jeremy
darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

sorry..how dumb I am :D

yes it works great, now I have to style CGBlog classes... and wait for the filters ;)
So far I'm very happy with this combination, as with CGBlog and Supersizer I get my front end portal running.

cheers
Darko
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

ok... so I didn't publish yet but here is the version with the filters... this is going to give you a massive bit of control... right now if one filter at a time... but I think I can make it where you can use a combination of filters...

So the filters... thought I'd be fast this way to present atm... in order from the photos outputed here...
http://www.corbensproducts.com/users/1/ ... zerEx.html

{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="NEGATE" }
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="GRAYSCALE"}
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="BRIGHTNESS" farg1=100}
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="CONTRAST" farg1=40}
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="COLORIZE" farg1="100" farg2="100" farg3="-100"}
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="EDGEDETECT" }
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="EMBOSS"  }
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="GAUSSIAN_BLUR"}
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="SELECTIVE_BLUR" }
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="MEAN_REMOVAL" }
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="SMOOTH" farg1=50 }
{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="PIXELATE" farg1=3  farg2=true}


Note that the PIXELATE filter needs php version 5.3.  the COLORIZE needs php 5.2.5.


Have fun with it and for some info on what and how you use I'd refer you to the php man...
http://www.php.net/manual/en/function.imagefilter.php
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Last edited by JeremyBASS on Fri Nov 27, 2009 12:26 am, edited 1 time in total.
darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

Thanks for releasing new version so quickly.. I continue with testing.

Now the Quality parameter not working i.e. the image is blotchy as the quality is set to lowest value..
I just overwrited the function.supersizer.php with new one and cleared the cache. When I get back to previous version works great. Tried different browser but same result. Templates are the same, nothing changed.

developing at localhost.. XAMPP 1.6.4, PHP 5.2.4. maybe it's the PHP version?

cheers
Darko
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

Well it's going to get worse as it get to 1... I've set the example at a lower value to show... it's set at 55 now in with this...

{supersizer path="uploads/feusers/$onepropvalue" width="100" alt="" Subdir=$oneuser.id cacheBuster=true Quality=55  filter="SELECTIVE_BLUR"}

(here)
http://www.corbensproducts.com/users/1/ ... zerEx.html


I did 3 versions in a  row (the real power of the plugin here.) and you can set the stepping down of quality. from 100 to 55 to 25... output is


Original image (FEU uploaded run thru CGUserdirectory)
Size is: 41222 bytes

Resized images (SuperSizer Made)
Quality=100 -- filter="SELECTIVE_BLUR"
Size is: 13898 bytes

Quality=55 -- filter="SELECTIVE_BLUR"
Size is: 2885 bytes

Quality=25 -- filter="SELECTIVE_BLUR"
Size is: 2014 bytes



Many things can change the final output, like starting with a jpg that has  extremely high amount of artifacts.  I guess best put  a jpg that started life as a raw file will always look better the one coming out of a standard webcam thou both ends are a jpg and the same dimensions.



Now that I think if it, I'm going to add a convert path... a "force" param to force a gif to a jpg.... later...

So I hope this helps.. play with it and find what will be good for the camera being used, don't know the camera then I'd set it higher.

Cheers
Jeremy
darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

Ok, I see that this works for you.. but not for me  :)

I'm just saying, that I have a problem with Quality in the latest version compared to the version you posted before this one.
The pictures are raw jpgs from my Canon camera...I changed nothing, same pictures uploaded and same CGBlog summary/details templates. Whether I put Quality parameter or not, the image comes out like the one attached (not usable at all).
When I return back to the version before last one (with filters), images come out on the page like it should (Quality parameter works).

Also, if the resulted quality depends on camera used, I'm in real trouble.. as the site users would upload their own images through frontend  :D

Thanks
Darko
Attachments
IMG_5127.-w0-h450-p0-F.jpg
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

Sorry what I meant on the " quality depends on camera used" that a low end camera compress more from the start, so to resize a compressed image .. well I'm sure you get that...

So... hmmm not sure what's going on ... there was no change to the quality code ... so put it in debug mode and get that info also I need GD versions, php versions, all the good stuff... and the tag call too plz

Also here is the script as of yet, what is on the test site this very sec.

Cheers
Jeremy
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

darconny
Forum Members
Forum Members
Posts: 104
Joined: Thu Nov 22, 2007 12:43 pm

Re: Announcement: New plug-in SuperSizer

Post by darconny »

I tried this one, result is the same.

Developing @localhost, PHP  5.2.4

GD:

GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled 

I'm not a programmer (designer), so the word 'debug mode' is very strange for me  :)

The tag call is like this (part of Detail template):

        {assign var=Photo value=$field->value}
        {assign var=Location value=$entry->file_location}
        {assign var=Item value=$entry->id}
        {supersizer path="$Location/$Photo" height="450" URL=true Assign="MainPic" Protect =false Subdir="$Item"}

As I said, I didn't change anything in templates..and when I revert to a version before, the Quality works.

Also sending my raw image, so you could try that out:
http://darconny.msmqtools.com/IMG_5127.JPG


cheers
Darko
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

darconny wrote: I tried this one, result is the same.

Developing @localhost, PHP  5.2.4

GD:

GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled 

I'm not a programmer (designer), so the word 'debug mode' is very strange for me  :)

The tag call is like this (part of Detail template):

         {assign var=Photo value=$field->value}
         {assign var=Location value=$entry->file_location}
         {assign var=Item value=$entry->id}
         {supersizer path="$Location/$Photo" height="450" URL=true Assign="MainPic" Protect =false Subdir="$Item"}

As I said, I didn't change anything in templates..and when I revert to a version before, the Quality works.

Also sending my raw image, so you could try that out:
http://darconny.msmqtools.com/IMG_5127.JPG


cheers
Darko

So... debugIT param is what you want...


{supersizer path="$Location/$Photo" height="450" URL=true Assign="MainPic" Protect=false Subdir="$Item" debugIT=true}


I'll give your image a try in the example page... brb -J
JeremyBASS

Re: Announcement: New plug-in SuperSizer

Post by JeremyBASS »

Ok.. so I put up the photo.... http://www.corbensproducts.com/users/1/ ... zerEx.html at the bottom... with this setup...

Code: Select all

 <h3>At Quality=100 filter="SMOOTH" farg1=50 </h3>
{supersizer path="uploads/images/IMG_5127[1].jpg" width="100" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="SMOOTH" farg1=50 Suffix="EX2"}
{supersizer path="uploads/images/IMG_5127[1].jpg" width="200" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="SMOOTH" farg1=50 Suffix="EX2"}
{supersizer path="uploads/images/IMG_5127[1].jpg" width="300" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="SMOOTH" farg1=50 Suffix="EX2"}
{supersizer path="uploads/images/IMG_5127[1].jpg" width="400" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=100 filter="SMOOTH" farg1=50 Suffix="EX2"}
<br/><br/>
 <h3>At Quality=55 filter="SMOOTH" farg1=50 </h3>
{supersizer path="uploads/images/IMG_5127[1].jpg" width="100" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=55 filter="SMOOTH" farg1=50 }
{supersizer path="uploads/images/IMG_5127[1].jpg" width="200" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=55 filter="SMOOTH" farg1=50 }
{supersizer path="uploads/images/IMG_5127[1].jpg" width="300" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=55 filter="SMOOTH" farg1=50 }
{supersizer path="uploads/images/IMG_5127[1].jpg" width="400" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=55 filter="SMOOTH" farg1=50 }
<br/><br/>
 <h3>At Quality=25 filter="SMOOTH" farg1=50 </h3>
{supersizer path="uploads/images/IMG_5127[1].jpg" width="100" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=25 filter="SMOOTH" farg1=50 Suffix="EX1"}
{supersizer path="uploads/images/IMG_5127[1].jpg" width="200" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=25 filter="SMOOTH" farg1=50 Suffix="EX1"}
{supersizer path="uploads/images/IMG_5127[1].jpg" width="300" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=25 filter="SMOOTH" farg1=50 Suffix="EX1"}
{supersizer path="uploads/images/IMG_5127[1].jpg" width="400" alt="SMOOTH" Subdir=$oneuser.id cacheBuster=true Quality=25 filter="SMOOTH" farg1=50 Suffix="EX1"}




As you can see they are fine... so I'm betting an issue with the server.  But I need the degbutIt param info, that will force a few things and insure that there is indeed an issue, as well as out put some infor.

Jeremy
Locked

Return to “Modules/Add-Ons”