Article View: borland.public.cppbuilder.nativeapi
Article #2444Re: JPEG info
From: Michael Harris
Date: Sat, 17 Feb 2007 19:38
Date: Sat, 17 Feb 2007 19:38
40 lines
2147 bytes
2147 bytes
class TJpegHack : public Jpeg::TJPEGImage
{ typedef Jpeg::TJPEGImage Inherited;
public:
virtual int __fastcall GetHeight(void)
{
return Inherited::GetHeight();
};
virtual HPALETTE __fastcall GetPalette(void)
{
return Inherited::GetPalette();
};
virtual int __fastcall GetWidth(void)
{
return Inherited::GetWidth();
};
};
std::auto_ptr<Jpeg::TJPEGImage> pJPG(new Jpeg::TJPEGImage);
pJPG->Assign(pBitmap.get());
int nImageWidth = static_cast<TJpegHack *>(pJPG.get())->GetWidth();
?
--
Michael
"poojo hackma" <poojo.com/mail> wrote in message
news:45d606a8$1@newsgroups.borland.com...
> Thanks Thomas.
>
> Looks like there isn't any straight forward way to get it. I was hoping
> there was something simple, like read the DWORD at the Nth byte from the
> start of the file. What I found seems to indicate that I'd have to do a
> lot of special checking for different cases of JPEG files, and make
> different decisions based on that.
>
> Work want this project out a little faster than that, so I'll just rig
> them up something to get by.
>
Technical Details
Message-ID:
<45d75a03@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45d5d8e7$1@newsgroups.borland.com> <m2tzxmvxxt.fsf@glue.ch> <45d606a8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,f148e62206621fe9 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Michael Harris" <techonos-NO-SPAM-@attbi.com> From: "Michael Harris" <techonos-NO-SPAM-@attbi.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <45d5d8e7$1@newsgroups.borland.com> <m2tzxmvxxt.fsf@glue.ch> <45d606a8$1@newsgroups.borland.com> Subject: Re: JPEG info Date: Sat, 17 Feb 2007 13:38:18 -0600 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 76.187.71.134 Message-ID: <45d75a03@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171741187 76.187.71.134 (17 Feb 2007 11:39:47 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail