473,563 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get the size of a jpeg image ?

How can I get the height and width of a jpeg image ?

Thank you for help me.

Jul 19 '05 #1
2 3581
You ca use javascript:
img = new Image();
img.src = source;
imgWidth = img.width;
imgHeight = img.height;

I think there's also an object you can use in asp, but I never used it.

Hope this helps,


"Emmanuel Alliel" <em************ *@fr.easynet.ne t> wrote in message news:<3f******* *************** *@news.easynet. fr>...
How can I get the height and width of a jpeg image ?

Thank you for help me.


Jul 19 '05 #2
Meindert, MCP

"Emmanuel Alliel" <em************ *@fr.easynet.ne t> wrote in message
news:3f******** *************** @news.easynet.f r...
How can I get the height and width of a jpeg image ?

Thank you for help me.


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: André Næss | last post by:
Photoshop has a function called optimize to file size which tries to fit an image to some given file size. Because I need to make sure no images on a site I'm working on are larger than X KB I need something similar so that users don't have to worry so much about image file size. Does anyone know of a way to do this, preferably using...
by: Tumurbaatar S. | last post by:
My ASP app dynamically retrieves from db and sends JPG images using Response.BinaryWrite(). And it seems work. The script sets image type as "Response.ContentType = 'image/JPEG';" But viewing image properties in IE returns Type and Size as 'Not available'. How to set these properties properly?
by: slavinger | last post by:
Hi, Got an interesting problem here: I'm using C# to resize an image (jpeg) from over 2000x1700 (in pixels) to 550x412. When I save the new image, its file size ends up being in the neighborhood of 550K. When I use a graphics editor app, it produces a similar quality 550x412 jpeg that's only 40K in size. What can I do in C# to cut down...
by: dgk | last post by:
I have an app that has many subdirectories containing one or more images (jpg, gif, bmp). When the user selects a directory, my plan is to show the images if there are only one or two, or show thumbnails if there are more and allow the user to click on each thumbnail to view it full size. Right now I'm just sticking an <IMG> tag for each...
by: Peter Proost | last post by:
Hi group, I've got a question about the size of a saved bitmap. What I need to do is open a bitmap if it needs resizing, resize and save it. This isn't a problem, but the problem I have is that the original image has got an 8 bit indexed pixelformat, but you can't create a graphics object for this pixelformat so my bitmap uses the default...
by: Philippe Martin | last post by:
Hi, Thanks to the NG, I got the script hereunder working. 1) I am not certain that the call to convert does much (checking the doc) 2) Can this be improved as far as the final image size in (X,Y) ? For instance, passing a large .jpg with a target byte size of 7000, I get final (X,Y) results around (213, 174) ... but might want to...
by: Gerrit | last post by:
Hi all, I'm getting an OutOfMemoryException when I initialize a byte array in C# like this: Byte test = new Byte; I'm using ASP.NET 2.0. In ASP.Net 1.1 it works fine. So what am I doing wrong?
by: Karen Hill | last post by:
How do I get the file size of a JPEG and resize it if it is too big in terms of MB or KB? I am using Windows Forms, .NET 2.0, C#. I want to put this image in a database so I want to make sure it isn't too large (ideally no more than 200K. I tried discovering the size of a JPEG using sizeof but that only works with built in types like int and...
by: mishrarajesh44 | last post by:
hii all, I am facing a problem currently.. i have a script for image uploading and resizing.. the image uploading takes place properly for every size images.. but, the resizing works for only small sized iamages.. for eg. resizing takes place for 70 kb sized images but fails for 600kb or more.. my code is below..
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 3714000 bytes) in /opt/lampp/htdocs/tutorials/php-mysql-tutorial/admin/image-gallery/library/functions.php on line 104 ...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.