NativeImagePtr BitmapImage::frameAtIndex(size_t index)
{
    if (index >= frameCount())
        return 0;

    if (index >= m_frames.size() || !m_frames[index].m_frame)
        cacheFrame(index);

    return m_frames[index].m_frame;
}
bool BitmapImage::frameIsCompleteAtIndex(size_t index)
{
    if (index >= frameCount())
        return true;

    if (index >= m_frames.size() || !m_frames[index].m_haveMetadata)
        cacheFrame(index);

    return m_frames[index].m_isComplete;
}
예제 #3
0
bool BitmapImage::ensureFrameIsCached(size_t index)
{
    if (index >= frameCount())
        return false;

    if (index >= m_frames.size() || !m_frames[index].m_frame)
        cacheFrame(index);

    return true;
}
예제 #4
0
bool BitmapImage::frameHasAlphaAtIndex(size_t index)
{
    if (index >= frameCount())
        return true;

    if (index >= m_frames.size() || !m_frames[index].m_haveMetadata)
        cacheFrame(index);

    return m_frames[index].m_hasAlpha;
}
예제 #5
0
float BitmapImage::frameDurationAtIndex(size_t index)
{
    if (index >= frameCount())
        return 0;

    if (index >= m_frames.size() || !m_frames[index].m_haveMetadata)
        cacheFrame(index);

    return m_frames[index].m_duration;
}
예제 #6
0
파일: Image.cpp 프로젝트: oroisec/ios
bool Image::frameHasAlphaAtIndex(size_t index)
{
    if (index >= frameCount())
        return 0;

    if (index >= m_frames.size() || !m_frames[index].m_frame)
        cacheFrame(index);

    return m_frames[index].m_hasAlpha;
}
예제 #7
0
bool BitmapImage::ensureFrameIsCached(size_t index, ImageFrameCaching frameCaching)
{
    if (index >= frameCount())
        return false;

    if (index >= m_frames.size()
        || (frameCaching == CacheMetadataAndFrame && !m_frames[index].m_image)
        || (frameCaching == CacheMetadataOnly && !m_frames[index].m_haveMetadata))
        cacheFrame(index, 0, frameCaching);

    return true;
}
예제 #8
0
PassNativeImagePtr BitmapImage::copyUnscaledFrameAtIndex(size_t index)
{
    if (index >= frameCount())
        return nullptr;

    if (index >= m_frames.size() || !m_frames[index].m_frame)
        cacheFrame(index, 0);

    if (!m_frames[index].m_subsamplingLevel)
        return CGImageRetain(m_frames[index].m_frame);

    return m_source.createFrameAtIndex(index);
}
예제 #9
0
void FrameManager::processFrame(const sensor_msgs::Image& img){
	//ROS_INFO("processFrame ... ");
	// caching current frame in memory
	cacheFrame(img);
}