xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46468] PNG's - warn if resolution can't be determined
Date Mon, 09 Feb 2009 21:38:16 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46468





--- Comment #2 from Jeremias Maerki <jeremias@apache.org>  2009-02-09 13:38:14 PST ---
Sorry for being late here (being the original author of the thing). The issue
here shows that someone was able to make use of the image loading framework
outside the FOP context which makes me happy. Mission accomplished. ;-) As for
the missing resolution information:

If using Toolkit.getDefaultToolkit().getScreenResolution() for the fallback
resolution is a problem, you can always use your own implementation of the
ImageContext interfaces. I'm also doing that in FOP where the default source
resolution if configured in an XML file.

If it is important to be notified if an image resolution is missing, I think
the most straight-forward solution is to introduce a listener interface which
can be made available through the ImageContext. Something like the following
maybe:

public interface ImageLoaderListener {
    void notifyMissingImageResolution(Object source, String uri, String mime);
}

I can imagine that, in time, we may add additional features either to the
listener or the Image(Session)Context.

Max noted different resolutions for X and Y. Some formats support that.
Personally, I've never seen an image with different X and Y resolutions, yet.
So if there's no need I wouldn't complicate things prematurely. That can always
be easily added in a backwards-compatible way if it's really needed. At any
rate, ImageInfo supports separate resolutions, just in case. But I don't
believe it's needed for the fallback.

WDYT?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Mime
View raw message