Click here to Skip to main content
15,912,507 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Saving Bitmap to WBMP Pin
Luc Pattyn16-Jul-08 0:18
sitebuilderLuc Pattyn16-Jul-08 0:18 
GeneralRe: Saving Bitmap to WBMP Pin
threemp316-Jul-08 13:04
threemp316-Jul-08 13:04 
GeneralRe: Saving Bitmap to WBMP Pin
Luc Pattyn16-Jul-08 13:19
sitebuilderLuc Pattyn16-Jul-08 13:19 
QuestionPlay .pps / .ppt file without installing MS Office Powerpoint Pin
divyesh143215-Jul-08 18:09
divyesh143215-Jul-08 18:09 
QuestionRe: Play .pps / .ppt file without installing MS Office Powerpoint Pin
Paul Conrad16-Jul-08 4:39
professionalPaul Conrad16-Jul-08 4:39 
AnswerRe: Play .pps / .ppt file without installing MS Office Powerpoint Pin
Thomas Stockwell16-Jul-08 4:48
professionalThomas Stockwell16-Jul-08 4:48 
GeneralRe: Play .pps / .ppt file without installing MS Office Powerpoint Pin
Paul Conrad16-Jul-08 4:50
professionalPaul Conrad16-Jul-08 4:50 
QuestionEfficiently resizing an image with a pixel resize Pin
jacobjordan15-Jul-08 10:59
jacobjordan15-Jul-08 10:59 
I know there are functions built into .NET that will resize images, but they don't do what i want. I am making an icon editor, and it needs to be able to resize images with a pixel resize. That is a type of resize where if you zoom in enough you can actually see the individual pixels of the original images, like Paint Shop Pro or Photoshop (or even paint) do. I have make an algorithm to do this, but it is unbelievably slow, and i need to make it do this almost instantly. I am using the Bitmap class and the Bitmap.GetPixle\Bitmap.SetPixle methods. Here is my algorithm:
Public Shared Function ResizePixles(ByVal image As Bitmap, ByVal factor As Integer) As Bitmap
    On Error Resume Next
    Dim rbmp As New Bitmap(image.Width * factor, image.Height * factor)
    For x As Integer = 0 To image.Width - 1
        For y As Integer = 0 To image.Height - 1
            Dim c As Color = image.GetPixel(x, y)
            For x2 As Integer = x * factor To x * factor + factor - 1
                For y2 As Integer = y * factor To y * factor + factor - 1
                    rbmp.SetPixel(x2, y2, c)
                Next
            Next
        Next
    Next
    Return rbmp
End Function

As you can see, i have 4 For loops in my code, which makes it very slow.


if (your.Life == lifestyles.Programming)
{
    your.Cool = true;
}
else
{
    your.Cool = false;
}

AnswerRe: Efficiently resizing an image with a pixel resize Pin
Luc Pattyn15-Jul-08 11:18
sitebuilderLuc Pattyn15-Jul-08 11:18 
GeneralRe: Efficiently resizing an image with a pixel resize [modified] Pin
jacobjordan15-Jul-08 12:37
jacobjordan15-Jul-08 12:37 
GeneralRe: Efficiently resizing an image with a pixel resize Pin
Luc Pattyn15-Jul-08 13:21
sitebuilderLuc Pattyn15-Jul-08 13:21 
GeneralRe: Efficiently resizing an image with a pixel resize Pin
jacobjordan15-Jul-08 13:25
jacobjordan15-Jul-08 13:25 
GeneralRe: Efficiently resizing an image with a pixel resize Pin
Luc Pattyn15-Jul-08 13:50
sitebuilderLuc Pattyn15-Jul-08 13:50 
GeneralRe: OnPaint Pin
Luc Pattyn15-Jul-08 15:05
sitebuilderLuc Pattyn15-Jul-08 15:05 
GeneralRe: Efficiently resizing an image with a pixel resize Pin
Luc Pattyn15-Jul-08 17:32
sitebuilderLuc Pattyn15-Jul-08 17:32 
Questiontreeview problem Pin
Member 226047315-Jul-08 10:31
Member 226047315-Jul-08 10:31 
AnswerRe: treeview problem Pin
Mr.PoorEnglish15-Jul-08 11:01
Mr.PoorEnglish15-Jul-08 11:01 
GeneralRe: treeview problem Pin
Member 226047315-Jul-08 16:13
Member 226047315-Jul-08 16:13 
GeneralRe: treeview problem Pin
Zaegra15-Jul-08 21:55
Zaegra15-Jul-08 21:55 
GeneralRe: treeview problem Pin
Mr.PoorEnglish15-Jul-08 22:51
Mr.PoorEnglish15-Jul-08 22:51 
QuestionIs there a way to get datagridview columns names in intellisense? Pin
Jon_Boy15-Jul-08 5:30
Jon_Boy15-Jul-08 5:30 
AnswerRe: Is there a way to get datagridview columns names in intellisense? Pin
Kschuler15-Jul-08 10:17
Kschuler15-Jul-08 10:17 
GeneralRe: Is there a way to get datagridview columns names in intellisense? Pin
Jon_Boy16-Jul-08 1:53
Jon_Boy16-Jul-08 1:53 
Questionresize problem in listbox Pin
emailthiaga15-Jul-08 3:01
emailthiaga15-Jul-08 3:01 
AnswerRe: resize problem in listbox Pin
John_Adams15-Jul-08 3:16
John_Adams15-Jul-08 3:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.