在picture library中取某一图片的大图、小图
public static string GetPicThumbnail(SPFile file, string type)
{
string thumbnail = "";
string folderUrl = file.ParentFolder.ServerRelativeUrl;
string fileName = file.Name;
int expIndex = fileName.LastIndexOf('.');
string subName = fileName.Substring(0, expIndex) + "_" + fileName.Substring(expIndex + 1) + ".jpg";
if (type == "small")
{
thumbnail = folderUrl + "/_t/" + subName;//这是拿小图的;
}
else if (type == "big")
{
thumbnail = folderUrl + "/_w/" + subName;//这是拿大图的;
}
return thumbnail;
}
在picture library中取某一图片的大图、小图的更多相关文章
- document library\ picture library\Asset Library的默认文件夹
document library\ picture library\Asset Library的默认文件夹? document library 默认文件夹:Forms picture library默 ...
- 基于Picture Library创建的图片文档库中的上传多个文件功能(upload multiple files)报错怎么解决?
复现过程 首先,我创建了一个基于Picture Library的图片文档库,名字是 Pic Lib 创建完毕后,我点击它的Upload 下拉菜单,点击Upload Picture按钮 在弹出的对话框中 ...
- php从数据库中取二进制流文件转换为图片,图片以二进制流存入数据库实现
php从数据库中取二进制流文件转换为图片,图片以二进制流存入数据库实现 function data_uri($contents, $mime) { $base64 = base64_encode($c ...
- 使用Python爬虫爬取网络美女图片
代码地址如下:http://www.demodashi.com/demo/13500.html 准备工作 安装python3.6 略 安装requests库(用于请求静态页面) pip install ...
- VC++使用CImage在内存中Jpeg转换Bmp图片
VC++中Jpeg与Bmp图片格式互转应该是会经常遇到,Jpeg相比Bmp在图片大小上有很大优势. 本文重点介绍使用现有的CImage类在内存中进行转换,不需要保存为文件,也不需要引入第三方库. Li ...
- python 爬取知乎图片
先上完整代码 import requests import time import datetime import os import json import uuid from pyquery im ...
- 使用openxml提取word中的文本和图片并转为Html
使用openxml提取word中的文本和图片 使用 openXml 提取 word 中的 Text 和 Drawing 使用 openXml 将 word 中的文本和图片转为Html 使用 openX ...
- 用WebCollector爬取站点的图片
用WebCollector爬取整站图片,仅仅须要遍历整站页面.然后将URL为.jpg.gif的页面(文件)保存到本地就可以. 比如我们爬取一个美食站点,获取里面全部的图片: import cn.edu ...
- python 爬虫入门----案例爬取上海租房图片
前言 对于一个net开发这爬虫真真的以前没有写过.这段时间学习python爬虫,今天周末无聊写了一段代码爬取上海租房图片,其实很简短就是利用爬虫的第三方库Requests与BeautifulSoup. ...
随机推荐
- Spark大数据处理技术
全球首部全面介绍Spark及Spark生态圈相关技术的技术书籍 俯览未来大局,不失精细剖析,呈现一个现代大数据框架的架构原理和实现细节 透彻讲解Spark原理和架构,以及部署模式.调度框架.存储管理及 ...
- [ZOJ 3623] Battle Ships
Battle Ships Time Limit: 2 Seconds Memory Limit: 65536 KB Battle Ships is a new game which is s ...
- Android-webView的loadUrl
1 //打开本包内asset目次下的test.html文件 wView.loadUrl(" file:///android_asset/test.html "); 2 //打开本地 ...
- Git报错:insufficient permission for adding an object to repository database .git/objects
在本地搭建Git服务器后,在开发机上push新代码,发现Git提示: insufficient permission for adding an object to repository databa ...
- 开源库CImg 数据格式存储
CImg为开源图像处理库,仅有一个头文件CImg.h便包含了对图像的所有处理函数,函数操作简单,编程方便,但国内使用者较少 其homepage:http://cimg.sourceforge.net/ ...
- Interviews3D: APlatform for Interactive Handing of Massive Data Sets 读后感
横向比较: Inadequacy of current system design( 现代系统和一些软件的不足) 软件特点: Output sensitivity Out-of core data h ...
- 理解wait notify的好例子
import java.util.concurrent.TimeUnit; public class Example2 { /** * @param args */ public static voi ...
- 支持Python 2.7的pylot
想用pylot测试一下板子上面的嵌入式web server.结果报错. E:\pylot_1.26>run.py -a 2 Traceback (most recent call last): ...
- HW4.18
public class Solution { public static void main(String[] args) { System.out.println("Graph 1&qu ...
- 普通用户从非80端口启动tomcat,通过端口转发监听80端口
linux下小于1024的端口都需要root去绑定. root权限启动tomcat是不明智的,可以使用非root权限启动tomcat监听8080端口,然后利用端口转发实现对80端口的监听. 端口转发: ...