• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Looking for Specific Bytes in a File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for Specific Bytes in a File


  • Subject: Re: Looking for Specific Bytes in a File
  • From: Andrew Oliver <email@hidden>
  • Date: Fri, 13 Feb 2004 10:57:04 -0800

Make your life easier.

Get a copy of GraphicImporter ( http://www.osaxen.com/graphicsimporter.html
) which can do this for you in one step:

giget gi size image (choose file)

Andrew
:)

On 2/13/04 10:38 AM, "Marconi" <email@hidden> wrote:

> I'm trying to open the data fork of a file and find the first
> occurrence of the hex bytes '1108' then grab the following four bytes
> and return them as two decimal values.
>
> What I'm doing:
> In a JPEG image file, it appears that the image width is in the two
> bytes following '1108' and the image height is the next two bytes
> after the width. These do not occur at a consistent offset. I'm
> intending on scripting some actions that depend on the dimensions of
> the JPEG image dropped onto the droplet script.
>
> I'm uncertain how to 'crawl' a file looking for that first '1108'.
> Should I convert 1108 to ASCII and search for that? Would it be
> better (faster) to search for '11' (or the ASCII thereof) first, then
> see if the next byte is '08'? Or would the difference be negligible?
>
> Advice?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Looking for Specific Bytes in a File
      • From: Marconi <email@hidden>
References: 
 >Looking for Specific Bytes in a File (From: Marconi <email@hidden>)

  • Prev by Date: Re: Looking for Specific Bytes in a File
  • Next by Date: Re: Finding out is an Application is running
  • Previous by thread: Re: Looking for Specific Bytes in a File
  • Next by thread: Re: Looking for Specific Bytes in a File
  • Index(es):
    • Date
    • Thread