SizePic 说明:可以用于WEB网站图片缩略图的批量处理[6]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:


                            For iW As Integer = 0 To SizeW - 1
                                For iH As Integer = 0 To SizeH - 1 '以宽为基本


                                    'MsgBox(SizeW - 1) '''''''''''
                                    okColor = imgok.GetPixel(iW, iH)


                                    newBitmp.SetPixel(iW, iH, okColor)

                                Next

                            Next

                        Catch ex As Exception

                            MsgBox(ex.ToString)

                        End Try

                        Me.PictureBox1.Image = imgok

                        Me.PictureBox1.Refresh()

                        ' imgok.Save(Me.TextBox2.Text & "\PIC_" & i & ".jpg")

                        Try

                            newBitmp.Save(Me.TextBox2.Text & "\PIC_" & i & ".jpg")


                        Catch ex As Exception

                            MsgBox(ex.ToString)

                        End Try


                    End If
                End If
            End If

            i += 1
            ProgressBar1.Value += 20
            If ProgressBar1.Value >= 100 Then

                ProgressBar1.Value = 0


            End If


        Next

        MsgBox("完成")
        System.Diagnostics.Process.Start(TextBox2.Text)


        ProgressBar1.Value = 0
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.TextBox1.Text = System.Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)

本文关键:SizePic 说明:可以用于WEB网站图片缩略图的批量处理
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top