void AutoResizeImageLabel::setImage( QString fileName, int frameCount ) {
    _nativeUsed = false;
    _frameCount = frameCount;
    QMovie* movie = new QMovie( fileName );

    if ( movie->isValid() && //image files have FrameCount -1
            ( movie->frameCount() == 0 || movie->frameCount() > 1 ) ) { //PLease Do not Leave out this line of Code Crucial for Pixture animated gif differentiation
        connect( movie, SIGNAL( frameChanged( int ) ), this, SLOT( animationFrameChanged( int ) ) );
        setMovie_internal( movie );
    }  else {
void VideoStackedWidget::setImageContentType( QString imageUrl ) {
    if( imageUrl.isEmpty() )
        return;

    QMovie *animatedImage = new QMovie( imageUrl );
    _origPixmap = QPixmap( imageUrl );

    if( animatedImage->isValid() && ( animatedImage->frameCount() == 0 || animatedImage->frameCount() > 1 ) )
        setAnimatedImage( animatedImage, false );
    else
        setPixmap( _origPixmap, false );
}