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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:23:02+00:00 2026-06-17T00:23:02+00:00

Given a PICT image file (either version of the file format), how can I

  • 0

Given a PICT image file (either version of the file format), how can I read the width and height from the header data?

For example, this is how I determine this information for a GIF file:

using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {
    int c1 = fs.ReadByte();
    int c2 = fs.ReadByte();
    int c3 = fs.ReadByte();

    if (c1 == 'G' && c2 == 'I' && c3 == 'F') {
        fs.Seek(3, SeekOrigin.Current);
        width = ReadInt(fs, 2, false);
        height = ReadInt(fs, 2, false);
        return true;
    }
}

// Signature for ReadInt:
// int ReadInt(FileStream fs, int bytes, bool bigEndian)
  • 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-06-17T00:23:03+00:00Added an answer on June 17, 2026 at 12:23 am

    I believe you’ll find that PICT files have a 512 byte header followed by the file size and image dimensions.

    [Platform Header] - 512 byte
    [File Size] - short
    [Image Top Left x] - short
    [Image Top Left y] - short
    [Image Bottom Right x] - short
    [Image Bottom Right y] - short
    

    The coordinates are stored at 72 dpi.

    Knowing this, you can calculate the image height and width 🙂

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

Sidebar

Related Questions

Given a stdio FILE * pointer, is there a method by which I can
Given this XML data: <root> <item>apple</item> <item>orange</item> <item>banana</item> </root> I can use this XSLT
Given this simplified data format: <a> <b> <c>C1</c> <d>D1</d> <e>E1</e> <f>don't select this one</f>
Given a MySQL table of real estate data, I would like to generate a
Given that an input String may be specified as follows: read(xpath(‘...’)) or xpath(‘...’) or
Given the following lines of XML:- <tmpr>10.85</tmpr><sensor>01</sensor><ch1><watts>1000</watts></ch1> <tmpr>-1.85</tmpr><sensor>01</sensor><ch1><watts>1000</watts></ch1> I can use the following Python
Given a java class with two methods (taken from mockito): OngoingStubbing<T> thenReturn(T value); OngoingStubbing<T>
Given a function xyz() in PostgreSQL, where and how can I actually use it?
Given a Map[Int, Set[Int]] , how can I modify a single value of the
Given a multirow, multicolumn table, how can I select all cells in the same

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.