need for natural height/width of image (API)

VERIFIED FIXED in M18

Status

()

Core
ImageLib
P3
normal
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: Brade, Assigned: pnunn)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+])

(Reporter)

Description

19 years ago
given a url (local or remote), the editor team needs an API to call to find out
what the "natural" size of an image is (height and width without html resetting
it).
(Reporter)

Updated

19 years ago
Blocks: 9754
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

19 years ago
Target Milestone: M11
(Assignee)

Comment 1

19 years ago
I  think this already exists. but my trees are in pieces.
As soon as I get my trees back, I get on it.
-pn
(Assignee)

Updated

19 years ago
Group: netscapeconfidential?
Target Milestone: M11 → M15
(Assignee)

Comment 2

19 years ago
changing target to postbeta.
Let me know if that presents a problem.
I talked to smfr and he said it wasn't
an absolute for beta.

Also, KB, we should work out reasonable error
msgs for unknown-url(not in imglib cache), not enough
decoded info for known-url.

Plus, since we don't yet have a netcache, the imglib does
not store animated image info. We'll need some sort of
work around.
-pn
(Reporter)

Comment 3

19 years ago
I don't think we need to worry about error messages.  If you can't get the size
info (such as for a malformed url or an unreachable url) just return 0,0.  For
now, we can handle the animated images the same way.
Thanks!

p.s.  Is there a bug for the netcache stuff?  If so, we should put a dependency
on that.
(Assignee)

Comment 4

19 years ago
yes. there is a bug for net cache.
(Assignee)

Updated

19 years ago
Target Milestone: M15 → M12
(Assignee)

Updated

19 years ago
Target Milestone: M12 → M13
(Assignee)

Comment 5

19 years ago
Kathy:

ImageRequestImpl::GetNaturalDimensions(aWidth, aHeight)
won't do the trick for you?
Where do you need this info and what can you access at
that point?

-Pamela
(Assignee)

Comment 6

19 years ago
An in hall talk with KB indicated she needs access
to the api vi idl.  Sammy may contribute help.
-pn
(Assignee)

Comment 7

19 years ago
kathy: will send email update to you. and code diffs.
-pn
(Assignee)

Updated

19 years ago
Target Milestone: M13 → M17
(Assignee)

Comment 8

19 years ago
Not needed immediately. Pushing milestone out.
(note to self: see diffs in d:\ed_moz ).
-pn

Updated

19 years ago
Blocks: 24206
(Assignee)

Comment 9

19 years ago
Notes to self:
gfx/src/nsImageRenderer.cpp
gfx/src/win/nsImageWin.cpp, .h
**also need changes on all gfx platform subdirs.
libimg/public/ilIImageRenderer.h
libimg/src/if.cpp
(Reporter)

Comment 10

18 years ago
pnunn: is it possible to get these fixes in for beta2 (M16)?
(Assignee)

Comment 11

18 years ago
Do these changes give you what you need?
If so, maybe we can work something out. Since
the changes would be needed on all platforms,
I'll need atleast 3 or 4 code reviews and oks and
several days notice to the folks on various 2nd
tier platforms.

Let me know if these changes give you what you need.
-P

Updated

18 years ago
Target Milestone: M17 → M16
(Assignee)

Updated

18 years ago
Target Milestone: M16 → M17

Updated

18 years ago
No longer blocks: 24206
(Assignee)

Updated

18 years ago
Keywords: nsbeta3
(Assignee)

Updated

18 years ago
Target Milestone: M17 → M18

Comment 12

18 years ago
cc'ing sfraser and cmanske since brade is out -- is this all that is needed to 
get the data we need?

Comment 13

18 years ago
really adding us this time

Comment 14

18 years ago
Pam whats the risk here? 
(Assignee)

Comment 15

18 years ago
Just sent you email, gagan.
-p

Comment 16

18 years ago
go for it!
Whiteboard: [nsbeta3+]
(Assignee)

Comment 17

18 years ago
Imglib side checked in. 
Charlie, I'm reassigning to you so it is on your
radar to hook up a query from nsHTTPImageElement.cpp
to get the info. I'll be happy to work with you on
this.

-P
Assignee: pnunn → cmanske
Status: ASSIGNED → NEW

Comment 18

18 years ago
removing netscape confidential flag
Group: netscapeconfidential?

Comment 19

18 years ago
I've requested help from Pam about getting to the size info from a DOM image 
element.
Status: NEW → ASSIGNED

Comment 20

18 years ago
This is a small change to some DOM idl/headers. Should be easily doable.

Comment 21

18 years ago
The only IDL I see for and image is HTMLImageElement.idl.
It would seem that the natural thing is to add GetIntrinsiceWidth() and 
GetIntrinsicHeight() to that. But isn't this the "official" DOM definition
and we would have to get permission to extend it?

Comment 22

18 years ago
We have to make nsIDOMNSHTMLImageElement.
(Assignee)

Comment 23

18 years ago
C:
I'll take back the bug until I get the data to nsHTMLImageElement
in a reasonable way.
We can talk/(or type) on tuesday.
-p
Assignee: cmanske → pnunn
Status: ASSIGNED → NEW
(Assignee)

Comment 24

18 years ago
uh, why was this marked new??
-p
Status: NEW → ASSIGNED
(Assignee)

Comment 25

18 years ago
finally closed. With much help from Simon.
-p
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 26

18 years ago
Verified per Pam's comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.