Bug 109920 - the CMS auto-detect doodad misidentifies PNG images as JPEG
Summary: the CMS auto-detect doodad misidentifies PNG images as JPEG
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other   
(Show other bugs)
Version: nightly
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Scott Seago
QA Contact: Jon Orris
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-13 00:03 UTC by Vadim Nasardinov
Modified: 2007-04-18 16:59 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-14 14:28:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
gratuitous screenshot (252.78 KB, image/png)
2003-11-13 00:04 UTC, Vadim Nasardinov
no flags Details

Description Vadim Nasardinov 2003-11-13 00:03:11 UTC
Steps to reproduce:

    1. Create an article.
    2. Go to the Image authoring step.
    3. Select to upload an image.
    4. Select a PNG image but leave the "Image Type" drop-down list at
       "(Auto-detect)".
    5. Upload the image.

Actual results:
    The image is identified as JPEG.  The image width and height are
    not detected.

Expected results:

    The image is identified as PNG.  The width and height are
    detected.

I used the following file:

$ file /var/vadim/docs/images/posters/communism-opensource.png 
/var/vadim/docs/images/posters/communism-opensource.png: PNG image data, 507 x 679, 8-bit colormap, non-interlaced

Here's what gets recorded:
    cat=# select
      image_id, name, width, height, mime_type
    from
      cms_images
    inner join cms_assets on (image_id = asset_id)
    inner join cms_items on (asset_id = item_id);

    cat-# -[ RECORD 1 ]-----------------------
    image_id  | 4001
    name      | communism-opensource.png
    width     | 
    height    | 
    mime_type | image/jpeg

Comment 1 Vadim Nasardinov 2003-11-13 00:04:45 UTC
Created attachment 95934 [details]
gratuitous screenshot

Comment 2 Scott Seago 2004-01-13 19:52:27 UTC
Is this still reproducible on the tip? When I tried this on my branch
(synced with the tip a couple of days ago), the mime type was
correctly identified as a PNG image. It did not determine the size,
though, as we do not currently have a PNGImageSizer class.

Comment 3 Vadim Nasardinov 2004-01-14 14:28:30 UTC
I can't reproduce it, either.  The mime type is correctly detected.
(ReusableImageAsset guesses the mime type based on the file 
extension.   The cms_mime_types has "png" as one of the recognized
extensions.  I don't know why this was failing at the time I filed
this ticket. )  Here's what I get now:

 =# select
      image_id, name, width, height, mime_type
    from
      cms_images
    inner join cms_assets on (image_id = asset_id)
    inner join cms_items on (asset_id = item_id);
[ RECORD 1 ]-----------------------
image_id  | 33001
name      | communism-opensource.png
width     | 
height    | 
mime_type | image/png


Closing.



Note You need to log in before you can comment on or make changes to this bug.