473,703 Members | 2,792 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 3587
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 ImageMagick or GD? Doing several calls to ImageMagick with different optimize settings is a not a good...
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 on resulting image's file size? Thanks!
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 image into a literal control. It works fine but the images are huge which surprised me. I really...
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 pixelformat: Format32bppArgb, but this ofcourse result in a much larger file size (420kB instead of...
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 strech it a bit
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 long. regards, karen
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 Platform: Ubuntu 8.04 LST (where i make my programs, and test them before i upload them), Using XAMPP for...
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
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: 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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.