Results 1 to 2 of 2
  1. #1
    gwentravolta's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    A cardboard Box
    Posts
    311
    Reputation
    9
    Thanks
    46

    Resizing Multiple Pictures?

    Hello Forum!

    It's been like 6 months since i've posted (since i quit CA for my new xbox) but its good to be back.

    I was just wondering how I can change the resolution of multiple pictures using VB.

    1) Explorer pops up to select photos
    2) Form pops up to put in desired resolution
    3) Form for desired output folder

    I'm just not sure how to do much with file editing since much of my VB programming is Phishers (shame on me :/), autoclickers, and other random doo-dads not pertaining to file editing.

    Much Appreciation,
    John


    Posts:
    10 posts []
    50 posts []
    100 posts []
    500 posts []

    Thanks:
    5 thanks []
    10 thanks []
    100 thanks []

    Profile:
    Make a signature []
    Set a profile picture []

    Hacks:
    Download and use a hack []
    Get a virus []
    ... or two... []
    Release my own hacks []



  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    [php] 'following code resizes picture to fit

    Dim bm As New Bitmap(PictureBox1.Image)
    Dim x As Int32 'variable for new width size
    Dim y As Int32 'variable for new height size

    Dim width As Integer = Val(x) 'image width.

    Dim height As Integer = Val(y) 'image height

    Dim thumb As New Bitmap(width, height)

    Dim g As Graphics = Graphics.FromImage(thumb)

    g****terpolationMode = Drawing2D****terpolationMode.HighQualityBicubic

    g.DrawImage(bm, New Rectangle(0, 0, width, height), New Rectangle(0, 0, bm.Width, _
    bm.Height), GraphicsUnit.Pixel)

    g.Dispose()


    'image path. better to make this dynamic. I am hardcoding a path just for example sake
    thumb.Save("C:\newimage.bmp", _
    System.Drawing.Imaging.ImageFormat.Bmp) 'can use any image format

    bm.Dispose()

    thumb.Dispose()

    [/php]

    Make a function out of it



  3. The Following User Says Thank You to Blubb1337 For This Useful Post:

    Insane (07-23-2010)

Similar Threads

  1. [Help] Will some say how to resize Picture??
    By CheatCreatorzz in forum CrossFire Mods & Rez Modding
    Replies: 3
    Last Post: 04-24-2011, 07:29 PM
  2. can you resize my picture
    By agamekiller in forum Help & Requests
    Replies: 9
    Last Post: 04-25-2009, 05:25 AM
  3. Self Pictures!
    By SpiderByte in forum General
    Replies: 7
    Last Post: 02-20-2006, 06:42 AM
  4. How can i resize a pic?
    By darkone1149 in forum Art & Graphic Design
    Replies: 4
    Last Post: 02-08-2006, 05:31 PM
  5. this picture may disturb you?
    By RebornAce in forum General
    Replies: 16
    Last Post: 02-03-2006, 04:01 AM