Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6023649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:02:11+00:00 2026-05-23T04:02:11+00:00

Perhaps I’m doing it wrong but I don’t think WPF or GDI+ classes are

  • 0

Perhaps I’m doing it wrong but I don’t think WPF or GDI+ classes are intended to process large images on a server. I have an app that needs to transform many large tiff files to different formats and sizes. Thumbnails and previews of these files are generated with the wpf classes and cached on disk so they are not a big deal.

My problem comes with the other higher res transformations which are not being cached atm. I’m thinking of using ImageMagick to replace the wpf for this part and see if there’s a performance gain but while I’m at it I’d like to see if you guys know of an alternative to the wpf an gdi+ classes to process large image files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:02:12+00:00Added an answer on May 23, 2026 at 4:02 am

    Well, which one are you using (which classes)? The Windows Imaging Component (WIC) as available through PresentationCore and WindowsBase are quite capable, if used properly.

    I wouldn’t go with GDI+ i.e. System.Drawing because that’s legacy and slow.

    If you just need raw processing power have your tried scaling out and distributing the work load? It’s can be done quite easily (to some extent) even without investing in new hardware.

    This is my main method with timers and all, it appears that the WIC stuff needs roughly 3 seconds to boot the first run takes about 3 seconds longer than the rest. The timings are then fairly consistent. I’m memory buffering to avoid the time it might take to pull or put the file from or to disk.

    for (int i = 0; i < 20; i++)
    {
        var total = new Stopwatch();
    
        var read = new Stopwatch();
    
        var process = new Stopwatch();
    
        total.Start();
    
        using (var inputStream = new FileStream(@"C:\Projects\ConsoleApplication6\ConsoleApplication6\monster.jpg", FileMode.Open))
        {
            read.Start();
    
            var bytes = new byte[inputStream.Length];
    
            inputStream.Read(bytes, 0, bytes.Length);
    
            read.Stop();
    
            process.Start();
    
            var bitmapImage = new BitmapImage();
            bitmapImage.BeginInit();
            bitmapImage.StreamSource = new MemoryStream(bytes);
            bitmapImage.DecodePixelWidth = 800;
            bitmapImage.EndInit();
    
            using (var outputStream = new MemoryStream())
            {
                var jpegEncoder = new JpegBitmapEncoder();
    
                var frame = BitmapFrame.Create(bitmapImage);
    
                jpegEncoder.Frames.Add(frame);
    
                jpegEncoder.Save(outputStream);
    
                process.Stop();
    
                File.WriteAllBytes(@"C:\Projects\ConsoleApplication6\ConsoleApplication6\monster" + i + ".jpg", outputStream.ToArray());
            }
        }
    
        total.Stop();
    
        Console.WriteLine("{0:0.000} ms ({1:0.000} ms / {2:0.000} ms)", total.Elapsed.TotalMilliseconds, read.Elapsed.TotalMilliseconds, process.Elapsed.TotalMilliseconds);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Perhaps I am barking up the wrong tree (again) but if it is normal
Perhaps I'm going about this the wrong way, but I'm using HXT to read
Perhaps this is the wrong place for this, but I'm not quite sure where
Perhaps not directly programming related, but definitely product / commercially related. And I can't
Perhaps I'm missing something with the concept of Extension Methods, but I cannot gain
Perhaps I am missing something, but I am just learning javascript. My understanding of
Perhaps I'm misapplying Unity, but here goes. I have a couple of applications, both
Perhaps my brain is fried, but I'm writing a plugin that created an tweaks
Perhaps I am missing something, but I can't explain this from any IE bug
Perhaps i'm wandering down the wrong path - I'm looking for a tool like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.