Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Conversion of 12 x 36 inch 300 dpi 100 images performance

$
0
0
Hi. Thanks for providing us support here. We are using vb.net to do the following:
  1. Take 100 images of size 12in x 36in and 300dpi and we want to do some color adjustments.
  2. Check and resize all images to be as above specs.
  3. Split into half and save again.
Here is my code:
    Dim currentimage As Integer = 0
    For Each img In imgarray
        '2. Apply settings to this image
        Using mgkImage As New MagickImage(imgarray(currentimage).ToString)
            mgkImage.BrightnessContrast(brightnessval, 0)
            mgkImage.BrightnessContrast(0, contrastval)
            mgkImage.Fx("u-" & cyanval.ToString, Channels.Red)
            '3. Save the image
            mgkImage.Write(DataValues.savepath & Path.GetFileName(mgkImage.FileName))
        End Using
        currentimage += 1
        saveFileprogress.Value = (currentimage / imgarray.Count) * 100
    Next
Now it takes 30 minutes to process 60 jpg files. Can we use Parallel.For or something you suggest to increase the speed and performance.

Moreover we need to check the resolution/dpi of each image also and if not 300, we need to make it exactly 12in x 36in and 300dpi.

Viewing all articles
Browse latest Browse all 3693

Trending Articles