× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Retrieving JPG and GIF file data in an AS/400 program
  • From: "Bob Crothers" <bob@xxxxxxxxxxxxxx>
  • Date: Thu, 31 Aug 2000 12:24:12 -0500
  • Importance: Normal

Rob,

Little/Big Endian refers to the byte ordering.

In the AS/400 world (Aka: Big Endian), integer data is stored with the high
order bytes first and low order bytes last.  As you would expect.

In the Intel (and others) world, they use little endian.  Eg: the LOW order
bytes come first followed by the high order bytes...in reverse order than
you would expect.

The result is in the as/400 world, a integer (binary) 16 bit value of 1
looks like hexadecimal x'0001' in memory/disk.  In the Intel or little
endian world, the same data would be x'0100'.

These issues become very important when doing cross platform stuff.

Why is this done?  Beats me.  Has something to do with the hardware level
and efficiency.  I just know this is the way the world is.

TIFF files have a flag (a "tag" actually, but that is a different subject)
in them to indicate what the byte order is.  PCX/DCX are always little
endian.  JPEG/GIF I do not know about.

I suspect doing this via RPG might be an "easier said then done" type
proposition.  I would recommend finding the C code to do it in the Unix
world, and then porting it to the AS/400.  NT/9x C can also be ported, but
Unix tends to be easier.

JMHO,
Bob Crothers

-----Original Message-----
From: owner-midrange-l@midrange.com [mailto:owner-midrange-l@midrange.com]On
Behalf Of Rob Dixon
Sent: Wednesday, August 30, 2000 12:01 PM
To: MIDRANGE-L@midrange.com
Subject: Re: Retrieving JPG and GIF file data in an AS/400 program

Bob


> And don't forget to pay attention to Little vs Big endian issues (Byte
> Ordering).  The AS/400 is Big endian,  Intel is little.  Unix is both
> depending on platform.

Thank you for this but could you explain further please.  Also, how do I
identify
the position of the image size using an AS/400 program retrieving jpeg and
gif
files from the IFS

Best wishes

Rob
________________________________________________________

Erros plc

44 (0) 1844 239 339

http://www.erros.co.uk - The AS/400 Neural Database for the Internet

_________________________________________________________


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.