I need to create an application that converts an image to an icon. This is for a school project, and I know there are libraries in VB that do image conversion, however I have to make the conversion process myself. My first task is to convert an JPEG into an icon. I made the GUI, and have the program open up the files and scale them down into my pictureBox. What I need, are some suggestions for the conversion, since I can't use what VB has. what do I need to start with ?
fileName = "test.jpg"
newFileName = "test.ico"
Dim bmp as System.Drawing.Bitmap= System.Drawing.Image.FromFile(fileName, true)
Dim ico as System.Drawing.Icon = System.Drawing.Icon.FromHandle(bmp.GetHicon())
Dim icofs as Stream = File.Create(newFileName)
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.ImageLocation = "C:\\image.jpg"
Dim bm As Bitmap = New Bitmap(PictureBox1.ClientSize.Width, PictureBox1.ClientSize.Height)
PictureBox2.ImageLocation = "C:\\test.ico"
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...