This is another call out to anyone that can help me discover what i'm doing wrong with my imagecopy thats creating the segments i cut from the original picture being so large in bytes.
THANKS
Thanks Matt,
BLOCK_WIDTH & HEIGHT are actually set to 20 and no scaling is actually necessary. The for loop goes around and cuts 20 x 20 segments from the original image which might be 40x40 for instance (going around 4 times therefore). I then reduce the quality of the image by 50 in the hope...
I have an image upload that uploads an image to a tmp directory from there the image can be viewed. It is resampled at 50% and is fine.
Then when a client is happy they can submit the image which is then cut into segments. I take the tmp image and imagecopyresample it again - see below.
//...
Jeff,
Your a genius!
Thanks, i have pretty much the same code as above apart form the creation of a new canvas. Thats some really good info you gave me. I didn't consider at all the meta stuff. Thanks for the time and effort of your post.
Chears,
Is there anyway i can reduce the quality of my images automatically in php. I need to reduce the quality to 80% or so, to reduce the file size.
I need to introduce the script when the image is uploaded to the site. Since i can't guarantee whether the client has uploaded an optimized image i...
I'd like to display a page chosen by random from several pages, but the pages need to be ranked with importance. E.g
Page1 = 50% Page2 = 30% Page3 = 20%
The percentages can change, what above shows is that Page1 is the most important and will show itself 50% of the time, Page2 30% of the time...
I know that array_unique will de-dupe an array but how do i get the duplicate values rather than a unique array. Is there a function that will return 1 copy of the duplicate values. e.g.
array1 = (1,2,3,3,3,4,5)
array_unique = (1,2,3,4,5)
what i want = (3)
I hope you understand that!
Thanks...
Is it possible to slice up a large image into smaller images that make up the whole. E.g. I'd like to take 1 picture 600 x 800 and slice it into smaller pictures e.g 64 pictures 75 x 100.
Is there a good way of doing this in PHP?
Thanks for any help.
I would like to create a character count for a textarea which counts the number of characters but when a new line (return is pressed) the counter defaults back to a chosen number such as 160 or whatever.
So far i have been able to get the counter to increase and decrease on keystrokes but am...
Trojan - when referring to seconds im referring to my php time i'm echoing.
What i can see is that at the time above (c below):
"2005-06-15 00:00:57"
The midnight cron (00:00:00) has already gone. Therefore by checking the seconds im noticing that within the same minute another cron is...
KenCunningham - Thats made us think a bit...
We do have a cron that checks an NTP server at midnight:
After a simple test this does have an effect on the timings. The cron is below:
0 12 * * * rdate -s 193.5.216.14 || rdate -s time.nist.gov
However this may solve some of our troubles but we...
Made a mistake with the copy & paste: (5 stars not 4)
* * * * * /usr/websites/harrydev/html/cron_time_test.php >> /usr/websites/harrydev/html/cron_time_test_log.log
Chears, HB
Thanks for the responses.
I can assure you that the date is not wrong on our live machines and we have very experienced developers setting up the cron jobs.
I ran a quick test yesterday and left it running from about mid day until now 09.55 - infact i'll keep monitoring it.
I have noticed...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.