Difference between JPG and JPEG

A

Andy

Is there any difference between JPG and JPEG?

And if not, then why the two extensions defined separately in the
registry?

Yet JPG appears far less frequently in the registry than JPEG does
although this does not imply anything about which is better for the
purpose.

But it does say they are not equally defined
 
D

David Candy

Some programs only recognise three letters extensions. There is also jpe (whatever lost the last letter of jpeg). They are all the same thing.
 
J

John Jay Smith

the format is the same, the extensions differ because of the use on various
platforms
(OS) not everyone uses windows you know.

the registry entries exist because windows has to be able to recognize all
of them
as images and open them with the image viewer.
 
E

Erasmus

http://www.faqs.org/qa/qa-5637.html

(Tone of voice: Instructive and seriously wishing to teach without
insult.)
Second item in the search the "dummy" posted. Try Google... read a few
on the search. If you have looked at the first 10 or 15 sites, and did
not find your answer, then post here. When posting here, make sure you
let us *know* that you already searched, and let us know what you did
and did not find. We are not your personal Wikipedia.
 
C

cquirke (MVP Windows shell/user)

Andy wrote:
No. .jpg is just the shorter version of .jpeg

..jpg, .jpeg and .jpe are all separate file associations that are
usually aggregated into one JPEG-handling association.

That means it's possible to unlink one or all of these extensions from
the aggregate file type and handle them differently. That may be
useful to facilitate different default actions, e.g. you can use the
"normal" viewer for .jpg but set an editor for .jpe, then use the
extension .jpe for the JPEGs you create and often wish to edit.

Things get blurry, though, because Windows can detect JPEG internally
and associate based on that. In such cases, the choice of extension
you use may make no difference.

I suspect what actually happens depends on context, and I'd guess IE
is more likely to go by internal type than Windows Explorer.


------------ ----- ---- --- -- - - - -
The most accurate diagnostic instrument
in medicine is the Retrospectoscope
 
A

Andy

http://www.faqs.org/qa/qa-5637.html

(Tone of voice: Instructive and seriously wishing to teach without
insult.)
Second item in the search the "dummy" posted. Try Google... read a
few on the search. If you have looked at the first 10 or 15 sites,
and did not find your answer, then post here. When posting here,
make sure you let us *know* that you already searched, and let us
know what you did and did not find. We are not your personal
Wikipedia.

Hi Erasmus

Surely you can't mean the guessers at http://www.faqs.org/qa/qa-
5637.html who clearly are speculating wildly?

Yes, I did I look at 10 or 15 sites and not just taken from the top
of the list but the ones which look most useful and then tried other
searches including a Groups search.

(*sigh* he wants to know if I have used Google properly and if I have
posted here without trying for an answer myself *sign*)

And nobody I came across talked about my original observation:
"that JPG appears far less frequently in the
registry than JPEG does although this does not
imply anything about which is better for the purpose.
But it does say they are not equally defined."

There is the usual old stuff anout JFIF being the real file type as
it is a semi-container, and JPE as a truncation of JPEG as well as
the real mccoy, JPG and JPEG

Before posting I had tried to follw this through the File Class
Associations in the registry but had to draw a line when one of the
class IDs (CLSID) appeared so frequently in other places in the
registry that it seemed to make little sense.

Just because my OP was brief and succinct does not mean I had not
spent some time trying to work this through.
 
A

Andy

Andy said:
.jpg, .jpeg and .jpe are all separate file associations that are
usually aggregated into one JPEG-handling association.

That means it's possible to unlink one or all of these extensions from
the aggregate file type and handle them differently. That may be
useful to facilitate different default actions, e.g. you can use the
"normal" viewer for .jpg but set an editor for .jpe, then use the
extension .jpe for the JPEGs you create and often wish to edit.

Things get blurry, though, because Windows can detect JPEG internally
and associate based on that. In such cases, the choice of extension
you use may make no difference.

I suspect what actually happens depends on context, and I'd guess IE
is more likely to go by internal type than Windows Explorer.

Oh my, there's a new complication. When I saw picture viewers automatically determine a file as a hped despite a misleading extension then I had thought that the picture viewer had read ahead and seen the JFIF header.

But you're saying that this is an embedded Windows function.

How many other file types does Windows XP automatically recognise? Is there a list?
 
D

David Candy

Not really. Windows isn't a monolithic product but lots of smaller products. Explorer doesn't sniff anything with a known extension. Internet Explorer does. However it does some complicated thing of comparing what the server says it is, what it sniffs, and what the extension is. I once downloaded a reg file and IE was certain it was an EXE file. It wasn't. Just a text file (that didn't even start with MZ as all exe and dll do).
 
D

David Candy

For Explorer in the Shell (and in COM/OLE extension is last)

1. Extension - if not registered
2. The CLSID from an OLE Compound File (Office Docs) if not one or not registered
3. Pattern matching against HKCR\FileType - sub keys are hold patterns and offsets that it can match against. Search MSDN COM documentation for docs on this key.

IE works differently.
 
D

David Candy

Command Prompt though will sniff exe files with or without an extension. Rename some exe file to .txt the type it in a command prompt.

--
--------------------------------------------------------------------------------------------------
How to lose a war in Iraq
http://webdiary.com.au/cms/?q=node/1335#comment-48641
=================================================
"David Candy" <.> wrote in message For Explorer in the Shell (and in COM/OLE extension is last)

1. Extension - if not registered
2. The CLSID from an OLE Compound File (Office Docs) if not one or not registered
3. Pattern matching against HKCR\FileType - sub keys are hold patterns and offsets that it can match against. Search MSDN COM documentation for docs on this key.

IE works differently.
 
C

cquirke (MVP Windows shell/user)

Explorer doesn't sniff anything with a known extension. Internet Explorer does.

<sigh> ...great logic; "let's trust the hidden contents of files
falling into the system from the Internet, so that hi-risk material
can pose as low-risk to the user and run hi-risk when 'opened' "
However it does some complicated thing of comparing what the server says it is,
what it sniffs, and what the extension is.

In the context of email attachments, there are three levels:
- what the MIME wrapper says it is
- what the extension says it is
- what it is

A safe OS would compare all of these for consistency, every time. If
there's a mis-match, it would be streetwise enough to suspect an
attack, and it would abort that content and alert.

In the context of files seen through the shell, again 3 levels:
- what the icon says it is
- what the extension says it is
- what it is

Again, "safety first" would mean treat files only as they are
described, and abort with alert if something tries to hide under the
wrong icon or extension. Here's how unbelievably wrong it goes...
- the most dangerous types can set any icon they like
- extensions are hidden by default
....are you with me so far? Yep, the user loses the ability to see
what type a file is, and thus has no way to predict impact.

But wait, it gets worse; even with extensions enabled, .PIF is never
shown. It gets worse still; if raw code is hidden in the .PIF itself,
it will be run as raw code when "opened", not as a true .PIF

Risk gradients can run in unexpected directions, so that even file
types that appear to be of similar level of risk, should be strictly
handled according to displayed type.

For example, when ways to run raw code through JPEG were discovered,
JPEG content within a nominally-hi-risk .EXE may be an issue.

For another example; when the seldom-used .WMF was found to be
attackable to run as raw code, it suddenly mattered that any .BMP,
..GIF, .JPG etc. could actually be WMF and "opened" as such.

We've known the benefits of strict type checking in programming
languages for some years (decades?) now. Time to bring that clue back
home to the world of files and file types.


--------------- ---- --- -- - - - -
"We have captured lightning and used
it to teach sand how to think."
 
E

Erasmus

Your initial post gave no indication that you had searched anywhere.
You also did not have to call the other individual a dummy. He was
responding as most would... assuming you had not searched because you
did not indicate that you had searched.

Since I do not know much about .jpeg vs. .jpg (I was reading this
thread to learn about it myself), I would not be a good judge of
whether or not the faqs.org page is valid or not, I was just responding
to the hostile response to Newport.

My key point was this: Don't assume we know what you have and have not
done. We don't want to waste our time if you have not taken the time
to do a simple search. Without telling us, we cannot know you did one.
Don't assume that someone is stupid just because you didn't like their
answer, or felt it was "insulting." It was a valid answer in response
to your limited post.

In short: Give us detailed posts if you are looking for detailed
answers.
 
T

Timothy Daniels

Erasmus said:
In short: Give us detailed posts if you are looking for detailed
answers.


Good advice. Some more good advice - say "Thank you"
when someone takes his/her valuable time to help you.
No one is getting paid to do it.

*TimDaniels*
 
M

Miles

Erasmus said:
Your initial post gave no indication that you had searched anywhere.
You also did not have to call the other individual a dummy. He was
responding as most would... assuming you had not searched because you
did not indicate that you had searched.

Since I do not know much about .jpeg vs. .jpg (I was reading this
thread to learn about it myself), I would not be a good judge of
whether or not the faqs.org page is valid or not, I was just responding
to the hostile response to Newport.

My key point was this: Don't assume we know what you have and have not
done. We don't want to waste our time if you have not taken the time
to do a simple search. Without telling us, we cannot know you did one.
Don't assume that someone is stupid just because you didn't like their
answer, or felt it was "insulting." It was a valid answer in response
to your limited post.

In short: Give us detailed posts if you are looking for detailed
answers.

Why are you so presumptuous? He asked a simple question, requesting a
simple answer. Please do not waste or time or complicate postings.
Miles
 
A

Andy

Good advice. Some more good advice - say "Thank you"
when someone takes his/her valuable time to help you.
No one is getting paid to do it.



I am the OP. Do you call this twaddle below "help"?
 
A

Andy

Your initial post gave no indication that you had searched
anywhere. You also did not have to call the other individual a
dummy. He was responding as most would... assuming you had not
searched because you did not indicate that you had searched.

Since I do not know much about .jpeg vs. .jpg (I was reading this
thread to learn about it myself), I would not be a good judge of
whether or not the faqs.org page is valid or not, I was just
responding to the hostile response to Newport.

My key point was this: Don't assume we know what you have and have
not done. We don't want to waste our time if you have not taken
the time to do a simple search. Without telling us, we cannot know
you did one. Don't assume that someone is stupid just because you
didn't like their answer, or felt it was "insulting." It was a
valid answer in response to your limited post.

In short: Give us detailed posts if you are looking for detailed
answers.

I am the OP. If you have a simple answer to my question then that is
fine by me. I don't need 20 lines of guff as an answer if 2 crisp
line do it better.

As for searching Google, the respondent assumed that because my
question was simple, succint and to the point that I was a lazy toad
who hadn't even made the effort to search Google.

Now if he has asked .. Have you search Google? in a non-accustory
tone I would reply politely that I did a lot of searching on Google
before posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top