Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 photoalbum and compression
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

ugger
Junior Member

Denmark
127 Posts

Posted - 13 November 2008 :  11:32:42  Show Profile  Visit ugger's Homepage
Hi
In my forum it is only allow to upload jpg-files to the photoalbum.
I've set a limit to the file-size to 100 kb but the photo-files can easily be compressed to 10-30 kb pr.image with f.e. photoshop.
Now it's getting close to be a hard job to compress all the imagefiles that the users are uploading. I would like to know if anyone in here knows how to make this done automatically. I've hear about some software called "clsimage.???" that should be able to do the work, but is it usable together with snitz-software?
Thanks all for a very great software.
<

balexandre
Junior Member

Denmark
418 Posts

Posted - 13 November 2008 :  11:59:31  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
I do image compression on my MOD using ASPJpg component that we can have in shared hosted environments, a part of that all you need is to code / modify a little the PhotoAbum MOD.

I use this little code to compress the image into a JPG with 90% quality and reduce the size to fit the Avatar MOD

destinationFile = un & "." & convertTo	
					
				Set Jpeg = Server.CreateObject("Persits.Jpeg")
				With Jpeg
					.Open server.MapPath(image_ref)
					.Canvas.Brush.Color = &HFFFFFF
					.Crop x, y, width + x, height + y
					.Quality = 90
					.Width = 96
					.Height = 96
				End With
				
				' save croped image to hard drive
				Jpeg.Save server.MapPath(AVATAR_PATH) & "\" & destinationFile
				set Jpeg=nothing

<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 13 November 2008 12:02:34
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 13 November 2008 :  12:01:42  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
http://www.chestysoft.com/imagefile/default.asp

ASP doesn't handle binary data to easily so you will need to use a component to iterate through all the images and process them to your liking.

There are other components here - http://www.aspin.com/home/components/graphics/images

You will need one that supports compression. I haven't looked too hard but I doubt that you will find a free one.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

ugger
Junior Member

Denmark
127 Posts

Posted - 13 November 2008 :  12:15:50  Show Profile  Visit ugger's Homepage
Actually I dont mind paying somthing, but where and how am I suppose to intergrate the software as the ASPJpg with the snitzsoftware<

Edited by - ugger on 13 November 2008 12:16:16
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 13 November 2008 :  14:01:33  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
I'm not familiarized with the PotoAlbum Mod code but you need to find the code that saves the image into the server folder and apply my code there first, you can remove the width and height if you are not resize it.

send me an email with your forum and source code, I can help you if you need.<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

ugger
Junior Member

Denmark
127 Posts

Posted - 13 November 2008 :  15:10:16  Show Profile  Visit ugger's Homepage
Thanks, but how do I email this to you, the emailsystem in Snitz does not allow fileattachments.<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 13 November 2008 :  15:17:53  Show Profile  Visit AnonJr's Homepage
Put it all in a .zip file and either send the link or post it here. If you post it, make sure you remove your database connection information and anything else of that nature. <
Go to Top of Page

ugger
Junior Member

Denmark
127 Posts

Posted - 13 November 2008 :  15:44:59  Show Profile  Visit ugger's Homepage
it's a whole lot of codelines, but it has to be in this asp-codes.
I presume you have these codes.

photo_album_upload.asp
inc_photo_album_functions.asp
ToFileSystem.asp
clsImage.asp
clsProgress.asp
clsUpload.asp<

Edited by - ugger on 13 November 2008 15:45:37
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 13 November 2008 :  18:06:25  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
ok, just give me the Mod link then :) I will work from there

and check if you have the component installed in your server / shared hosting company.

To check that just create a new file and called testComponent.asp and add the code:


Set Jpeg = Server.CreateObject("Persits.Jpeg")
response.write( Jpeg.version )


save it, upload it and test it (run the page)

and tell me wht do you want to do, for example, you can tell the users to upload a photo but the system will reduce image quality while the photo have more than 40Kb... so, a photo of 800x600 that have a size of 70kb with 20% compression, would have 40kb using 60% compression.


<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 13 November 2008 18:19:19
Go to Top of Page

ugger
Junior Member

Denmark
127 Posts

Posted - 14 November 2008 :  04:12:07  Show Profile  Visit ugger's Homepage
I get this result from testcomponent.asp

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/testComponent.asp, line 2

What I want to do is that images with a width more than 500 pixels is reduced to 500 pixels
It is vital that the images's proportions still is right.
Images with a width less than 500 pixels is not to be changed.
Then the images has to be compressed with what Photoshop calls medium compression.





Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
<
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 November 2008 :  07:41:27  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
So, you will have a problem, that component does not exist in the server.

It that your server or a hosting solution? if it is yours, you need to buy the component, if you have the forum in a hosting solution, check the ASP components and tell me one that for images that they have installed.

About of what you want, tat is pretty easy to do.<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 November 2008 :  07:44:49  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
quote:
Originally posted by ugger

Thanks, but how do I email this to you, the emailsystem in Snitz does not allow fileattachments.



Think out of the box! there are a thousand ways to put the zip file in the web and paste the URL in the email! you can use your own account to upload the file, you can use SkyDrive from Microsoft, you can use ... there are so many!

P.S. you still didnt provide me with the Mod link!<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 14 November 2008 07:46:01
Go to Top of Page

ugger
Junior Member

Denmark
127 Posts

Posted - 14 November 2008 :  08:02:29  Show Profile  Visit ugger's Homepage
I will ask my serversupport!

bliv nu ikke for emsig, du da vel selv snitzsoftwaren IKKE!
sorry,missing tranlastion here it comes

Don't get too smart, you do have the Snitzsoftware, right?


<

Edited by - ugger on 15 November 2008 07:11:29
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 14 November 2008 :  08:25:07  Show Profile
Try this here for the actual Mod: http://www.snitzbitz.com/mods/details.asp?Version=All&mid=45
quote:
Originally posted by balexandre

[quote]P.S. you still didnt provide me with the Mod link!

<

Cheers,

David Greening
Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 November 2008 :  10:29:12  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
Hi David,

I knew wre the Mod was, but I needed with all the plug ins that Henrik has, and by the way, the Mod mention AspJpeg component so I guess it is easier to do
but thanks anyway David <

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"


Go to Top of Page

balexandre
Junior Member

Denmark
418 Posts

Posted - 14 November 2008 :  10:36:46  Show Profile  Visit balexandre's Homepage  Send balexandre an ICQ Message
Thanks David,

I knew where it was, but I wanted the exact version and addons that Henrik uses... but thxs anyway David

@Henrik:

first of all, you should always write in english or at least have a translation in english so everyone can see and read, and that is a stupid think to say cause I just wanted to help you! I am so glad that I'm not Danish! You are extremely rude!<

Bruno Alexandre
(Strøby, DANMARK)

"a Portuguese in Danmark"



Edited by - balexandre on 14 November 2008 10:37:38
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07