problem in using magic collection

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
wael
Posts: 5
Joined: 2016-04-02T11:00:27-07:00
Authentication code: 1151

problem in using magic collection

Post by wael »

I use this code to gather my png photos in one animated gif. but nothing happens except form is closing>> what is wrong?
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim photos As String() = Directory.GetFiles(Application.StartupPath, "*.png")
Using collection As New MagickImageCollection()
Dim iarray As Integer = 0
For Each name As String In photos
collection.Add(name)
collection(iarray).AnimationDelay = 0
iarray += 1
Next

Dim settings As New QuantizeSettings()
settings.Colors = 256
collection.Quantize(settings)

collection.Optimize()
collection.Write("imagemagick.gif")

End Using
End Sub
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem in using magic collection

Post by fmw42 »

I have moved this topic, since it does not appear to be consulting for payment. The Consulting forum is for Paid Consulting, only.

Also this seems to be a duplicate post from another forum. Please do not post multiple times for the same topic.
wael
Posts: 5
Joined: 2016-04-02T11:00:27-07:00
Authentication code: 1151

Re: problem in using magic collection

Post by wael »

ok. thank u
Post Reply