whirlpool6
Members-
Posts
26 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
whirlpool6's Achievements
Member (2/5)
0
Reputation
-
i only see a black image when i use createimagefromjpeg with URL. i even used a native url and it is still the same. when i use direct path, i can see the image though. what could the possible cause be? this is run on linux server and allow_url_fopen is turned on. thanks
-
hello guys, im just wondering if there is antialiasing feature in javascript.... and if so, can anyone pls help me how to use it? thanks a lot...
-
image imagecopyresized and imagecopyresampled problems
whirlpool6 replied to whirlpool6's topic in PHP Coding Help
everything is fine now. i only restarted apache and refreshed the page. i can see the image clearly now. but i want the image to be placed in an <img> object in html... how can this be done. i dont know how to.. thanks a lot. -
hello guys... i have the following codes but no image is seen... <?php // The file you are resizing $file = 'D:\public\try.jpg'; //This will set our output to 45% of the original size $size = 0.45; // This sets it to a .jpg, but you can change this to png or gif header('Content-type: image/jpeg'); // Setting the resize parameters list($width, $height) = getimagesize($file); $modwidth = $width * $size; $modheight = $height * $size; // Creating the Canvas $tn= imagecreatetruecolor($modwidth, $modheight); $source = imagecreatefromjpeg($file); // Resizing our image to fit the canvas imagecopyresized($tn, $source, 0, 0, 0, 0, $modwidth, $modheight, $width, $height); // Outputs a jpg image, you could change this to gif or png if needed imagejpeg($tn); ?> and <?php // The file $filename = 'D:\public\try.jpg'; $percent = 0.5; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = $width * $percent; $new_height = $height * $percent; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p); ?> i only copied them from tutorials but they are not working... what is possibly wrong? i already have gd2 in my php. thansk a lot
-
can suggest of other ways of doing this? im having a page which zooms in /out images. this program will be run only in ie so no need to think for other browser support. to zoom images, i only changed the width and height of img object. of course i cant do this in php because we have approximately 300 clients and i cant always fetch a new image when image is zoomed. this will surely slow down the system. hoping for a positive reply. thanks
-
really? there is no image smoothing in javascript? how about css? direct-x? can suggest of other ways of doing this? im having a page which zooms in /out images. this program will be run only in ie so no need to think for other browser support. to zoom images, i only changed the width and height of img object. of course i cant do this in php because we have approximately 300 clients and i cant always fetch a new image when image is zoomed. this will surely slow down the system. hoping for a positive reply. thanks
-
hello guys. is there a way to smoothen images displayed on a page through css? i would like displayed images to be clearer. they are very dirty as of now.. thanks a lot.
-
hello guys. is there a way to smoothen images displayed on a page through javascript? i would like displayed images to be clearer. they are very dirty as of now.. thanks a lot.
-
hello guys, can anybody solve this? thanks a lot.
-
here is a sample of the image url used... HTTP://AAAAA/BBB/DOCUMENTUM//430/SS010/HL/2007/03/28/HL000000681360-1//NEW/ss010-2007032879383.jpg i dont know if anything is wrong here...
-
madtechie thanks for the reply. so you mean that the url might be incorrect because of things like /..? what other things are not allowed? i mean, our url doesn't even have things like this. are there other things not allowed? and how does the browser correct such things?
-
hello guys, i am really not interested in getting the width and height of the image per se. but im interested in getting their height and width on or after they load. i have to do this to display the image correctly. if the image width is bigger than that of the height, the image is to be displayed with a width of 100. else, its height will be 90. so this has to be done before the image is displayed. i have placed a function to get the width and height on the onload of the image but unfortunately, they return zero. why is this so guys? thanks a lot.
-
there is really nothing wrong with the url... images still display in the end. this means that the image exists... but i have no idea why this returns blanks. im guessing that this may be because of slow download speed. i dont know...
-
hello everyone, i am using javascript and php in my web application. before i display images, i would like to get their width and height. i used the getimagesize() function of php, but there are time when the width and height returned are blanks. i dont know how and i dont know why but there are really times like this. because of this, i started to search for a workaround when this scenario happens. i placed an onload function in my img tag. in that function i used this.width and this.height to get the size. but then, they returned zeroes. i dont know what to do now. can anybody please help me? how do i get the image width and height using either php or javascript? thanks a lot.
-
hello everyone, i am using javascript and php in my web application. before i display images, i would like to get their width and height. i used the getimagesize() function of php, but there are time when the width and height returned are blanks. i dont know how and i dont know why but there are really times like this. because of this, i started to search for a workaround when this scenario happens. i placed an onload function in my img tag. in that function i used this.width and this.height to get the size. but then, they returned zeroes. i dont know what to do now. can anybody please help me? how do i get the image width and height using either php or javascript? thanks a lot.