Bug 109920 - the CMS auto-detect doodad misidentifies PNG images as JPEG
the CMS auto-detect doodad misidentifies PNG images as JPEG
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity low
: ---
: ---
Assigned To: Scott Seago
Jon Orris
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-12 19:03 EST by Vadim Nasardinov
Modified: 2007-04-18 12:59 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-14 09:28:30 EST
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-12 19:04 EST, Vadim Nasardinov
no flags Details

  None (edit)
Description Vadim Nasardinov 2003-11-12 19:03:11 EST
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-12 19:04:45 EST
Created attachment 95934 [details]
gratuitous screenshot
Comment 2 Scott Seago 2004-01-13 14:52:27 EST
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 09:28:30 EST
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.