Author |
Message |
Paul #1 / 20
|
jpg + vb6
Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? Because the files are more than 2MB and I need to reduce it! Thank you very much!
|
Sat, 18 Dec 2010 05:36:48 GMT |
|
|
Mike William #2 / 20
|
jpg + vb6
Quote: > Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? > Because the files are more than 2MB and I need to reduce it!
Do you actually mean "crop", or do you mean resize? Mike
|
Sat, 18 Dec 2010 05:59:31 GMT |
|
|
Paulo Robert #3 / 20
|
jpg + vb6
I think both are the same... don't you? Please post me some example code if you know any! Many thanks!
Quote:
>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >> Because the files are more than 2MB and I need to reduce it! > Do you actually mean "crop", or do you mean resize? > Mike
|
Sat, 18 Dec 2010 06:23:52 GMT |
|
|
Jeff Johnso #4 / 20
|
jpg + vb6
Quote: >> Do you actually mean "crop", or do you mean resize? >I think both are the same... don't you?
No. Crop means to cut out a certain portion of an image, discarding the rest. Resize means to alter the entire image to make it bigger or smaller.
|
Sat, 18 Dec 2010 07:05:22 GMT |
|
|
Bob O`Bo #5 / 20
|
jpg + vb6
Quote:
> I think both are the same... don't you? Please post me some example code if > you know any!
Crop and resize are DRAMATICALLY different. If you don't know what you want, this is not the right place to seek help. Quote: > Many thanks!
>>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >>> Because the files are more than 2MB and I need to reduce it! >> Do you actually mean "crop", or do you mean resize? >> Mike
|
Sat, 18 Dec 2010 07:07:05 GMT |
|
|
Paulo Robert #6 / 20
|
jpg + vb6
I already said what I need, I have a 2000x1000px (or more) jpg file and I wonder if it would be possible to "convert" to 640x480 or less, reducing the size of the file... if it is called crop or resize for me and to my customer does not matter... can you understand me ? thank you very much
Quote:
>> I think both are the same... don't you? Please post me some example code >> if you know any! > Crop and resize are DRAMATICALLY different. > If you don't know what you want, this is not the right place to seek help. >> Many thanks!
>>>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >>>> Because the files are more than 2MB and I need to reduce it! >>> Do you actually mean "crop", or do you mean resize? >>> Mike
|
Sat, 18 Dec 2010 07:13:48 GMT |
|
|
Karl E. Peterso #7 / 20
|
jpg + vb6
Quote:
>I already said what I need, I have a 2000x1000px (or more) jpg file and I > wonder if it would be possible to "convert" to 640x480 or less, reducing the > size of the file... > if it is called crop or resize for me and to my customer does not matter... > can you understand me ?
The FreeImage library is very useful for just about any sort of image operation you need to do. http://freeimage.sourceforge.net/ -- .NET: It's About Trust! http://vfred.mvps.org
|
Sat, 18 Dec 2010 08:39:21 GMT |
|
|
Bill #8 / 20
|
jpg + vb6
It makes a very large difference depending on which you want to do. If you have a 2000x1000 picture of the Island of Manhattan (New York) with hundreds of buildings and you CROP it - you end up with a 640x480 picture of maybe 10 buildings. On the other hand, you take the same picture and RESIZE it, you have the same hundreds of buildings, but now it is 640x480. So, the question still remains - Crop or Resize? Billl ---> Quote: > I already said what I need, I have a 2000x1000px (or more) jpg file and I > wonder if it would be possible to "convert" to 640x480 or less, reducing the > size of the file... > if it is called crop or resize for me and to my customer does not matter... > can you understand me ? > thank you very much
>>> I think both are the same... don't you? Please post me some example code >>> if you know any! >> Crop and resize are DRAMATICALLY different. >> If you don't know what you want, this is not the right place to seek help. >>> Many thanks!
>>>>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >>>>> Because the files are more than 2MB and I need to reduce it! >>>> Do you actually mean "crop", or do you mean resize? >>>> Mike
|
Sat, 18 Dec 2010 10:51:43 GMT |
|
|
Paulo Robert #9 / 20
|
jpg + vb6
Bill I can conclude that the best word that describes what I need is: RESIZE! Thank you very much!
Quote: > It makes a very large difference depending on which you want to do. If > you have a 2000x1000 picture of the Island of Manhattan (New York) with > hundreds of buildings and you CROP it - you end up with a 640x480 picture > of maybe 10 buildings. > On the other hand, you take the same picture and RESIZE it, you have the > same hundreds of buildings, but now it is 640x480. > So, the question still remains - Crop or Resize? > Billl > ---> >> I already said what I need, I have a 2000x1000px (or more) jpg file and I >> wonder if it would be possible to "convert" to 640x480 or less, reducing >> the size of the file... >> if it is called crop or resize for me and to my customer does not >> matter... can you understand me ? >> thank you very much
>>>> I think both are the same... don't you? Please post me some example >>>> code if you know any! >>> Crop and resize are DRAMATICALLY different. >>> If you don't know what you want, this is not the right place to seek >>> help. >>>> Many thanks!
>>>>>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >>>>>> Because the files are more than 2MB and I need to reduce it! >>>>> Do you actually mean "crop", or do you mean resize? >>>>> Mike
|
Sat, 18 Dec 2010 11:07:09 GMT |
|
|
Mike William #10 / 20
|
jpg + vb6
Quote: > I already said what I need, I have a 2000x1000px (or more) > jpg file and I wonder if it would be possible to "convert" to > 640x480 or less, reducing the size of the file...if it is called > crop or resize for me and to my customer does not matter... can you > understand me ?
Actually it matters a lot. Crop and resize are not simply two names for the same thing, as you appear to think. They are the names of two very different things. Both of them will reduce the size of the file, but they will do two completely different things to the image in the process. You really do need to understand the difference between them before you proceed any further. Reading between the lines of your posts it would appear that you actually mean "resize" rather than "crop", and of course there are various ways of doing it, but before we start I think it would be wise for you to accept the advice you have already been given and think about the differences between the two (crop and resize) rather than post remarks that sound (at least to me) as though you are annoyed in some way about the advice you have so far received. Mike
|
Sat, 18 Dec 2010 13:13:32 GMT |
|
|
Bill #11 / 20
|
jpg + vb6
Fine, Paulo. Then, in this case, the advice that Karl gave you would be the best. I have used that library a bit and agree that most functions you want are in it. Billl ---> Quote: > Bill I can conclude that the best word that describes what I need is: > RESIZE! > Thank you very much!
>> It makes a very large difference depending on which you want to do. If >> you have a 2000x1000 picture of the Island of Manhattan (New York) with >> hundreds of buildings and you CROP it - you end up with a 640x480 picture >> of maybe 10 buildings. >> On the other hand, you take the same picture and RESIZE it, you have the >> same hundreds of buildings, but now it is 640x480. >> So, the question still remains - Crop or Resize? >> Billl >> ---> >>> I already said what I need, I have a 2000x1000px (or more) jpg file and I >>> wonder if it would be possible to "convert" to 640x480 or less, reducing >>> the size of the file... >>> if it is called crop or resize for me and to my customer does not >>> matter... can you understand me ? >>> thank you very much
>>>>> I think both are the same... don't you? Please post me some example >>>>> code if you know any! >>>> Crop and resize are DRAMATICALLY different. >>>> If you don't know what you want, this is not the right place to seek >>>> help. >>>>> Many thanks!
>>>>>>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >>>>>>> Because the files are more than 2MB and I need to reduce it! >>>>>> Do you actually mean "crop", or do you mean resize? >>>>>> Mike
|
Sat, 18 Dec 2010 22:44:07 GMT |
|
|
Bob Riemersm #12 / 20
|
jpg + vb6
For Windows XP SP1 or later you could use: Option Explicit 'Needs reference to: 'Microsoft Windows Image Acquisition Library 2.0 Private Sub Command1_Click() Dim imgJPEG As WIA.ImageFile Dim ipScale As WIA.ImageProcess Set imgJPEG = New WIA.ImageFile imgJPEG.LoadFile "003.jpg" Set ipScale = New WIA.ImageProcess With ipScale .Filters.Add .FilterInfos!Scale.FilterID .Filters(1).Properties!MaximumWidth = 640 .Filters(1).Properties!MaximumHeight = 480 Set imgJPEG = .Apply(imgJPEG) End With On Error Resume Next Kill "003scaled.jpg" On Error GoTo 0 imgJPEG.SaveFile "003scaled.jpg" MsgBox "Done." End Sub No funky 3rd party libraries needed.
Quote: > Fine, Paulo. Then, in this case, the advice that Karl gave you would be > the best. I have used that library a bit and agree that most functions > you want are in it. > Billl > ---> >> Bill I can conclude that the best word that describes what I need is: >> RESIZE! >> Thank you very much!
>>> It makes a very large difference depending on which you want to do. If >>> you have a 2000x1000 picture of the Island of Manhattan (New York) with >>> hundreds of buildings and you CROP it - you end up with a 640x480 >>> picture of maybe 10 buildings. >>> On the other hand, you take the same picture and RESIZE it, you have the >>> same hundreds of buildings, but now it is 640x480. >>> So, the question still remains - Crop or Resize? >>> Billl >>> ---> >>>> I already said what I need, I have a 2000x1000px (or more) jpg file and >>>> I wonder if it would be possible to "convert" to 640x480 or less, >>>> reducing the size of the file... >>>> if it is called crop or resize for me and to my customer does not >>>> matter... can you understand me ? >>>> thank you very much
>>>>>> I think both are the same... don't you? Please post me some example >>>>>> code if you know any! >>>>> Crop and resize are DRAMATICALLY different. >>>>> If you don't know what you want, this is not the right place to seek >>>>> help. >>>>>> Many thanks!
>>>>>>>> Hi, how do I crop a jpg 2000x1000 px to 800x600px or less? >>>>>>>> Because the files are more than 2MB and I need to reduce it! >>>>>>> Do you actually mean "crop", or do you mean resize? >>>>>>> Mike
|
Mon, 20 Dec 2010 12:37:53 GMT |
|
|
Mike William #13 / 20
|
jpg + vb6
Quote: > For Windows XP SP1 or later you could use: > Option Explicit > 'Needs reference to: > 'Microsoft Windows Image Acquisition Library 2.0 > Private Sub Command1_Click() > Dim imgJPEG As WIA.ImageFile > Dim ipScale As WIA.ImageProcess > [rest of code snipped] > No funky 3rd party libraries needed.
Looks interesting, but can it be used to convert a bmp into a jpg? If I use your WIA resize code on a jpg original then the resized image is also a jpg, but if I use it on a bmp original then the resized image is a bmp. I'm guessing that the Image Acquisition Library is capable of converting bmps to jpgs. If so, how is it done? Mike
|
Mon, 20 Dec 2010 15:03:18 GMT |
|
|
senn #14 / 20
|
jpg + vb6
Quote:
>> For Windows XP SP1 or later you could use: >> Option Explicit >> 'Needs reference to: >> 'Microsoft Windows Image Acquisition Library 2.0 >> Private Sub Command1_Click() >> Dim imgJPEG As WIA.ImageFile >> Dim ipScale As WIA.ImageProcess >> [rest of code snipped] >> No funky 3rd party libraries needed. > Looks interesting, but can it be used to convert a bmp into a jpg? If I > use your WIA resize code on a jpg original then the resized image is also > a jpg, but if I use it on a bmp original then the resized image is a bmp. > I'm guessing that the Image Acquisition Library is capable of converting > bmps to jpgs. If so, how is it done? > Mike
Try there, Mike http://msdn.microsoft.com/en-us/library/ms630819(VS.85).aspx
|
Mon, 20 Dec 2010 15:58:39 GMT |
|
|
RDub #15 / 20
|
jpg + vb6
Quote: >Acquisition Library is capable of converting bmps to jpgs. If so, how is it >done?
Looks like you apply a filter. This seemed to work. Private Sub Resize1Pic() Dim imgJPEG As WIA.ImageFile Dim ipScale As WIA.ImageProcess Set imgJPEG = New WIA.ImageFile imgJPEG.LoadFile "Ajpgfile" Set ipScale = New WIA.ImageProcess With ipScale .Filters.Add .FilterInfos!Scale.FilterID .Filters(1).Properties!MaximumWidth = 640 .Filters(1).Properties!MaximumHeight = 480 .Filters.Add .FilterInfos!Convert.FilterID .Filters(2).Properties!FormatID.Value = wiaFormatBMP Set imgJPEG = .Apply(imgJPEG) End With On Error Resume Next On Error GoTo 0 imgJPEG.SaveFile "AbmpFile..." End Sub It seems to know about wiaFormatBMP, wiaFormatPNG, wiaFormatGIF, wiaFormatJPEG, and wiaFormatTIFF file types. I have only tested PNG and BMP. I just bought a new 12mp digital camera, and was wondering how I was gonna resize all the 5 and 6mb jpg's to a smaller size to make it easier to upload and view them on web albums. I think this is my answer. Using this libary I should be able to create a little app that can convert directories full of big picts into web friendly little picts in just an hour or two. Now where to find the hour? Special thanks to Bob Riemersma for bringing this to my attention.
Quote:
>> For Windows XP SP1 or later you could use: >> Option Explicit >> 'Needs reference to: >> 'Microsoft Windows Image Acquisition Library 2.0 >> Private Sub Command1_Click() >> Dim imgJPEG As WIA.ImageFile >> Dim ipScale As WIA.ImageProcess >> [rest of code snipped] >> No funky 3rd party libraries needed. > Looks interesting, but can it be used to convert a bmp into a jpg? If I > use your WIA resize code on a jpg original then the resized image is also > a jpg, but if I use it on a bmp original then the resized image is a bmp. > I'm guessing that the Image Acquisition Library is capable of converting > bmps to jpgs. If so, how is it done? > Mike
|
Mon, 20 Dec 2010 20:11:53 GMT |
|
|