On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

Current User: Guest
Please consider registering

 
Search Forums:


 




Image Resize Not Working Properly

UserPost

3:51 am
24 Jun 2008


Ken

Guest

 
1

I have image resize set to 500.

The plugin works well for photos over 500 in size.

But for photos under 500 in size it seems to be blowing up to 500% the size of the original image?

4:57 am
24 Jun 2008


Mr Papa

Moderator

Arizona, USA

posts 1277

 
2

I am afraid I am unable to replicate this behavior…  its working fine for me…  dumb question, but you are entering 500 in the image size field and not 500% or not 500px?

I have tried this on two installations and cant repeat it…  could you please provide a link to your site to take a look?  Also, if special permissions are needed to insert an image, would it be possible for you to create me a temporary account and PM me the details here?

8:05 pm
26 Jun 2008


Ken

Guest

 
3
MEN'S SENIOR NATIONAL TEAM
Carmelo
Anthony
F
6-8
Denver Nuggets
Carlos
Boozer
F
6-9
Utah
Jazz
Chris
Bosh
F
6-10
Toronto
Raptors
Kobe
Bryant
G
6-6
LA
Lakers
Dwight
Howard
F-C
6-11
Orlando
Magic
LeBron
James
F
6-8
Cleveland
Cavaliers
Jason
Kidd
G
6-4
Dallas
Mavericks
Chris
Paul
G
6-0
NOR
Hornets
Tayshaun
Prince
F
6-9
Detroit
Pistons
Michael
Redd
G
6-6
Milwaukee
Bucks
Dwyane
Wade
G
6-4
Miami
Heat
Deron
Williams
G
6-3
Utah
Jazz

8:07 pm
26 Jun 2008


Ken

Guest

 
4

above is an example…

but my images would resize even larger than the images above (probably due to my page template)


but as you can see above, the photo which is 65px is being resize to a large image.

not sure if this is how its suppsoed to work.. but i suspected the plugin to only resize the images if they were larger than the specified value… it seems that if its smaller, its resizing to be larger? and when you click it it goes back to original size?

2:28 am
27 Jun 2008


Yellow Swordfish

Admin

Peterborough, England

posts 4667

 
5

It's actually a problem caused by the way you are embedding images.  You are not using the image toolbar icon to do this and absolutly NO image size data has been entered or saved with the post. The forum knows there is an image tag but is unable to extract the size because you have not bothered to enter it.

On one hand I can see that could be considered a bug. On another level it is user error.

2:44 pm
27 Jun 2008


Ken

Guest

 
6

Ah i see, thanks.

I had actually copied and pasted that directly from NBA.com (just highlighted the table then pasted it into tinymce)

Could the bug be in how TinyMCE is parsing the clipboard contents and not properly entering the size dimensions?

http://www.nba.com/usabasketball/

is where i copy and pasted the table from.


Actualy, when i look at it… NBA.com did not put any size dimensions in their image tags…

<img src="/media/playerfile/lebron_james.jpg">

3:35 pm
27 Jun 2008


Mr Papa

Moderator

Arizona, USA

posts 1277

 
7

when an image tag is used without size constraints, it is meant to be shown in the ful size of the image…  the image enlarger keys off of the size constraints on the img tags…  without them its, getting confused…  still trying to figure out best and most robust way to deal with this…

5:59 pm
27 Jun 2008


Ken

Guest

 
8

i believe there are various libraries that exist that will get the image size from an image (unfortunatly i dont' know them)

I beleive tinymce does this already, when you insert an image it automatically inserts the hieght width attributes into the tag.

perhaps the best way is to use these libraries to get the width OR height of the image in the event that one of those attributes do not exist.

sounds easier than it is.. i know :)

6:03 pm
27 Jun 2008


Ken

Guest

 
9

via php

$mysock = getimagesize("images/mytestimage.jpg");

width = $mysock[0]

height = $mysock[1]

6:08 pm
27 Jun 2008


Mr Papa

Moderator

Arizona, USA

posts 1277

 
10

already have done that, but few other issues to think about…  will get something in next release…

6:17 pm
27 Jun 2008


Yellow Swordfish

Admin

Peterborough, England

posts 4667

 
11

Mr Papa said:

already have done that, but few other issues to think about…  will get something in next release…


The first is that while it is generally available not all hosts automatically include the GD library…

6:19 pm
27 Jun 2008


Mr Papa

Moderator

Arizona, USA

posts 1277

 
12

the getimagesize() function is standard php and does not require the GD library…  just have to worry about paths and not corrupt smilies/emoticons and few other nits…  have prototype up and running…

12:14 am
28 Jun 2008


Ken

Guest

 
13

great news!!!!

thanks guys! this is why im such a huge fan of yellow swordfish development!



Reply to Topic: Image Resize Not Working Properly

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 3 + 6        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

17 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 15

Topics: 1791

Posts: 12090

Members:

There are 831 members

There are 756 guests


Yellow Swordfish has made 4667 posts

Top Posters:

Mr Papa - 1277

-Radio- - 482

ovizii - 94

jfv - 80

angelic007 - 66

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)