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 7169843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:05:34+00:00 2026-05-28T15:05:34+00:00

I have such code using (Image image = System.Drawing.Image.FromStream(sourceStream)) { Guid objGuid = image.FrameDimensionsList[0];

  • 0

I have such code

using (Image image = System.Drawing.Image.FromStream(sourceStream))
{
    Guid objGuid = image.FrameDimensionsList[0];
    FrameDimension objDimension = new FrameDimension(objGuid);
    int pageCount = image.GetFrameCount(objDimension);

    for (int i = 0; i < pageCount; i++)
    {
          image.SelectActiveFrame(objDimension, i);
          resultStream = new MemoryStream();
          image.Save(resultStream, ToSystemImageFormat(outputFormat));
          result.Add(resultStream.ToArray());
    }
}

the purpose – to save each TIFF’s page as png and store it as byte’s array. The problem that on my two WIN7 computers that I tested it works fine. But I have one WinXP computer and this piece of code fails with “Parameter not valid” exception. The TIFF document always the same. Somebody knows where is the problem?

I tried to use ImageConverter:

ImageConverter imageConverter = new System.Drawing.ImageConverter();
using (Image image = (Image)imageConverter.ConvertFrom(sourceContent))
{
     Guid objGuid = image.FrameDimensionsList[0];
     FrameDimension objDimension = new FrameDimension(objGuid);
     int pageCount = image.GetFrameCount(objDimension);

     for (int i = 0; i < pageCount; i++)
     {
            image.SelectActiveFrame(objDimension, i);
            resultStream = new MemoryStream();
            image.Save(resultStream, ToSystemImageFormat(outputFormat));
            result.Add(resultStream.ToArray());
      }
}

but it fails too with same exception.
Thank you

UPD#1: It fails on Image.FromStream() method. I forgot to mention that the most TIFF documents are converted without any problem, it fails on specific ones. But on WIN7 verything fine even with these specific ones.

  • 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-28T15:05:36+00:00Added an answer on May 28, 2026 at 3:05 pm

    I know that winxp has limited support for png. You can’t load icon files that are actually compressed pngs (the standard on win 7) in .net 4.0 running on winxp, you get the same exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have such code: <h:inputText id=input value=#{bean.input}> <f:convertNumber /> <rich:ajaxValidator event=onblur /> </h:inputText> I
I have such code in my JSF template: <h:form> <table id=users cellspacing=0> <a4j:repeat var=person
i have such code var prj = _dataContext.Project.FirstOrDefault(p => p.isPopular == true); if (prj
I have such code: function allValid() { $('input').each(function(index) { if(something) { return false; }
For reference, the code is for the motorola 68008. Say I have code such
So I have some openGL code (such code for example) /* FUNCTION: YCamera ::
I have such a basic problem in Delphi,I can't solve it. My Code: Note:DataR
I was wondering, if I have some code such as: $result = $db->query($sql); //
I have been looking into coloring objects like ellipses with code such as SolidBrush
We have a place in a code of such form: void processParam(Object param) {

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.