ifubad Posted September 4, 2008 Share Posted September 4, 2008 Using getimagesize to get the width that is always larger than 125px, and the width will always be adjusted down to 125px. How can I get the percentage difference of the adjustment? thnx Link to comment https://forums.phpfreaks.com/topic/122651-solved-converting-image-px-width-to/ Share on other sites More sharing options...
ifubad Posted September 4, 2008 Author Share Posted September 4, 2008 or do I need to just do some good old basic math like 243px / 100 = 2.43% 125px / 2.43 = 51.44% 243px - 51.44% = 125px Link to comment https://forums.phpfreaks.com/topic/122651-solved-converting-image-px-width-to/#findComment-633340 Share on other sites More sharing options...
ifubad Posted September 4, 2008 Author Share Posted September 4, 2008 Forget it, I got the calculation 243px / 100 = 2.43% 125px / 2.43 = 51.44% 2.43 * 51.44 = 124.9992px I just thought maybe there was an easier way with a php function that I don't know about. Link to comment https://forums.phpfreaks.com/topic/122651-solved-converting-image-px-width-to/#findComment-633347 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.