做相冊源碼
㈠ 找個像QQ相冊那樣的程序源代碼
<?php
$image_url = array("第一張圖片的url","最後一張圖片的url");
$img_cnt = count($image_url);
$img_flag = $_GET['img_flag'];
$img_num = $_GET['img_num'];
if(empty($img_num)) $img_num = 0;
if(!empty($img_flag))
{
if($img_flag == "preview")
{
$img_num--;
if($img_num <0) $img_num = $img_cnt;
}
else
{
$img_num++;
if($img_num >$img_cnt) $img_num = 0;
}
}
?>
<form name="my_ablum" method="GET">
<center><img src="<?=$image_url[$img_num]?>"><br />
<a href="aa.php?img_flag=preview&img_num=<?=$img_num?>">前一張</a>
<a href="aa.php?img_flag=next&img_num=<?=$img_num?>">後一張</a><center>
</form>
只是個範例,具體根據你的要求增減代碼即可。
㈡ 求一個圖片管理系統或開源相冊,支持無限分類和tag標簽
推薦使用Gallery,是一個專業的圖片管理軟體。。。
相關介紹:
Gallery是一款基於WEB的軟體。它使得你可以對自己網站中的相片進行管理。你的網站必須有PHP和資料庫的支持來安裝和使用Gallery。通過使用Gallery,你能輕松地在一個直觀的界面中創建和維護相冊。相片管理包括縮略圖的自動創建,圖像尺寸重設,旋轉,排序,字幕及搜索等。相冊和相片可以進行查看和刪除。通過身份驗證的用戶還可以擁有其他的許可權,從而獲取額外的隱私保護。它具有很好的社群向 - 將帳號分配給你的朋友與家人。然後他們就可以在你的網站里上傳和管理自己的相片了。
㈢ 網頁相冊代碼,可以自動載入文件夾內新添加的圖片的
可採用指定文件夾,自動遍歷其下圖片文件的形式解決,參考網上
網路存儲
(
網盤
)模塊源碼。
㈣ Cocos Creator怎麼使用安卓手機相冊中的圖片,最好有示例源碼
android 將drawable中的圖片保存到系統相冊中的原理比較簡單,獲取到的bitmap,然後通過的compress方法寫到一個fileoutputstream中. 再通知MediaScannerService有圖片文件加入就可以了.
保存圖片的核心代碼如下:
Bitmap bitmap= BitmapFactory.decodeResource(getResources(), R.drawable.icon);
MediaStore.Images.Media.insertImage(context.getContentResolver(), bitmap, name, "");
或者
FileOutputStream fos = openFileOutput("image", Context.MODE_PRIVATE);
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);
fos.flush();
fos.close();
//發送系統通知消息
context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory())));
另一種方法是直接使用文件流讀寫:
InputStream is = mContext.getResources().openRawResource(PicID);
FileOutputStream fos = new FileOutputStream(LogoFilePath);
byte[] buffer = new byte[8192];
int count = 0;
while((count=is.read(buffer)) > 0)
{
fos.write(buffer, 0, count);
}
fos.close();
is.close();
這里要注意目錄許可權問題:在應用程序AndroidManifest.xml中的manifest節點中加入android:sharedUerId="android.uid.system"這個屬性。然後放在源碼環境中編譯,並通過adb install 的方式進行安裝。mk文件中的屬性改為LOCAL_CERTIFICATE :=platform。
㈤ android開發,如何把圖庫中一張選中的照片,寫入到APP的SQLite或者私有文件夾中
首先你能不能獲取到圖庫中的圖片,如果你已經獲取了圖庫中的圖片了,那麼把圖片放到資料庫中的代碼我給你,如果沒有獲取到圖片,那你就先獲取圖片了再說咯
㈥ C#製作電子相冊,求大神給源碼啊
刪除本地圖片
首先獲得圖片的路徑
string address="路徑";
FileInfo file = new FileInfo(address);
file.delete();
增加就直接保存圖片框裡面的圖片就OK了
SaveFileDialog fileone = new SaveFileDialog();
fileone.OverwritePrompt = true;
fileone.Filter = "BMP文件|*.bmp|GIF文件|*.gif|JPG文件|*.jpg|PNG文件|*.png|ICO文件|*.ico|所有文件|*.*";
fileone.FilterIndex = 1;
fileone.ShowDialog();
if (fileone.FilterIndex == 1)
{
this.picBox.Image.Save(fileone.FileName, System.Drawing.Imaging.ImageFormat.Bmp);
userHelper.iniSuffix = ".bmp";
}
else if (fileone.FilterIndex == 2)
{
this.picBox.Image.Save(fileone.FileName, System.Drawing.Imaging.ImageFormat.Gif);
userHelper.iniSuffix = ".gif";
}
else if (fileone.FilterIndex == 3)
{
this.picBox.Image.Save(fileone.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
userHelper.iniSuffix = ".jpg";
}
else if (fileone.FilterIndex == 4)
{
this.picBox.Image.Save(fileone.FileName, System.Drawing.Imaging.ImageFormat.Png);
userHelper.iniSuffix = ".png";
}
else
{
this.picBox.Image.Save(fileone.FileName, System.Drawing.Imaging.ImageFormat.Icon);
userHelper.iniSuffix = ".ico";
}
userHelper.iniAddress = fileone.FileName;
toolStripTextBox1.Text = fileone.FileName;